diff options
author | Sven Moritz Hallberg <sm@khjk.org> | 2008-02-10 22:12:13 +0100 |
---|---|---|
committer | Sven Moritz Hallberg <sm@khjk.org> | 2008-02-10 22:12:13 +0100 |
commit | 5d6204020ac3439388666df54600ad65a384046b (patch) | |
tree | fbc239d0ccc7739ef0c078532e8a7706cc1888f6 /otr.c | |
parent | 94e7eb3aaefc753ea81ea8c9e38570407d4c9790 (diff) |
remove cleartext fallbacks during keygen
Diffstat (limited to 'otr.c')
-rw-r--r-- | otr.c | 22 |
1 files changed, 2 insertions, 20 deletions
@@ -256,15 +256,7 @@ char *otr_handle_message(struct im_connection *ic, const char *handle, const cha char *colormsg; if(!g_mutex_trylock(ic->irc->otr_mutex)) { - user_t *u = user_findhandle(ic, handle); - - /* fallback for non-otr clients */ - if(u && !u->encrypted) { - return g_strdup(msg); - } - - /* TODO: queue msgs received during keygen for later? */ - irc_usermsg(ic->irc, "otr msg from %s during keygen - dropped", + irc_usermsg(ic->irc, "otr keygen in progress - msg from %s dropped", peernick(ic->irc, handle, ic->acc->prpl->name)); return NULL; } @@ -312,17 +304,7 @@ int otr_send_message(struct im_connection *ic, const char *handle, const char *m ConnContext *ctx = NULL; if(!g_mutex_trylock(ic->irc->otr_mutex)) { - user_t *u = user_findhandle(ic, handle); - - /* Fallback for non-otr clients. - Yes, we must be very sure this doesn't send stuff in the clear where it - shouldn't... */ - if(u && !u->encrypted) { - return ic->acc->prpl->buddy_msg(ic, (char *)handle, (char *)msg, flags); - } - - /* otherwise refuse to send */ - irc_usermsg(ic->irc, "otr msg to %s not sent during keygen", + irc_usermsg(ic->irc, "otr keygen in progress - msg to %s not sent", peernick(ic->irc, handle, ic->acc->prpl->name)); return 1; } |