aboutsummaryrefslogtreecommitdiffstats
path: root/otr.c
diff options
context:
space:
mode:
authorSven Moritz Hallberg <sm@khjk.org>2008-02-10 22:12:13 +0100
committerSven Moritz Hallberg <sm@khjk.org>2008-02-10 22:12:13 +0100
commit5d6204020ac3439388666df54600ad65a384046b (patch)
treefbc239d0ccc7739ef0c078532e8a7706cc1888f6 /otr.c
parent94e7eb3aaefc753ea81ea8c9e38570407d4c9790 (diff)
remove cleartext fallbacks during keygen
Diffstat (limited to 'otr.c')
-rw-r--r--otr.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/otr.c b/otr.c
index 6320b3fc..0f441e3d 100644
--- a/otr.c
+++ b/otr.c
@@ -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;
}