From 9ea6769c544df2398237ca87eab4516c16d7caa3 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 25 Jun 2016 13:08:49 -0700 Subject: [PATCH] parseModes: allow type str as modestring --- classes.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/classes.py b/classes.py index 92e78e6..39dd7c3 100644 --- a/classes.py +++ b/classes.py @@ -480,6 +480,11 @@ class Irc(): # B = Mode that changes a setting and always has a parameter. # C = Mode that changes a setting and only has a parameter when set. # D = Mode that changes a setting and never has a parameter. + + if type(args) == str: + # If the modestring was given as a string, split it into a list. + args = args.split() + assert args, 'No valid modes were supplied!' usermodes = not utils.isChannel(target) prefix = ''