From fe709e630fbe69c34907713a28da1d240b5d4310 Mon Sep 17 00:00:00 2001 From: nemunaire Date: Mon, 20 Oct 2014 21:57:04 +0200 Subject: [PATCH] SMS module: new nemubot version fix --- modules/sms.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/sms.py b/modules/sms.py index ec1ac10..f96bfad 100644 --- a/modules/sms.py +++ b/modules/sms.py @@ -62,10 +62,10 @@ def cmd_sms(msg): fails = list() for u in msg.cmds[1].split(","): DATAS.index[u]["lastuse"] = cur_epoch - if msg.private: - frm = msg.nick + if msg.to_response[0] == msg.frm: + frm = msg.frm else: - frm = msg.nick + "@" + msg.channel + frm = msg.frm + "@" + msg.to[0] test = send_sms(frm, DATAS.index[u]["user"], DATAS.index[u]["key"], " ".join(msg.cmds[2:])) if test is not None: fails.append( "%s: %s" % (u, test) )