SMS module: new nemubot version fix

This commit is contained in:
nemunaire 2014-10-20 21:57:04 +02:00
parent bd92f64449
commit fe709e630f

View File

@ -62,10 +62,10 @@ def cmd_sms(msg):
fails = list() fails = list()
for u in msg.cmds[1].split(","): for u in msg.cmds[1].split(","):
DATAS.index[u]["lastuse"] = cur_epoch DATAS.index[u]["lastuse"] = cur_epoch
if msg.private: if msg.to_response[0] == msg.frm:
frm = msg.nick frm = msg.frm
else: 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:])) test = send_sms(frm, DATAS.index[u]["user"], DATAS.index[u]["key"], " ".join(msg.cmds[2:]))
if test is not None: if test is not None:
fails.append( "%s: %s" % (u, test) ) fails.append( "%s: %s" % (u, test) )