瀏覽代碼

messages.py: Call encode() on the string passed to parse_privmsg().

parazyd 4 年之前
父節點
當前提交
7e87e36b2a
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      mallumo/messages.py

+ 2 - 2
mallumo/messages.py

@@ -58,7 +58,7 @@ def message_in_cb(data, modifier, modifier_data, string):
     """Incoming messages callback"""
     """Incoming messages callback"""
     debug(("message_in_cb()", data, modifier, modifier_data, string))
     debug(("message_in_cb()", data, modifier, modifier_data, string))
 
 
-    parsed = parse_privmsg(string, modifier_data)
+    parsed = parse_privmsg(string.encode(), modifier_data)
     debug(json.dumps(parsed))
     debug(json.dumps(parsed))
 
 
     # If we're in a channel, do nothing more
     # If we're in a channel, do nothing more
@@ -163,7 +163,7 @@ def message_out_cb(data, modifier, modifier_data, string):
     result = ""
     result = ""
 
 
     # If any exception is raised in this function, weechat will not send
     # If any exception is raised in this function, weechat will not send
-    # the outgoing message, which could be somethign that the user intended
+    # the outgoing message, which could be something that the user intended
     # to be encrypted. This paranoid exception handling ensures that the
     # to be encrypted. This paranoid exception handling ensures that the
     # system fails closed and not open.
     # system fails closed and not open.
     try:
     try: