@@ -47,6 +47,22 @@ def password(self):
4747 def password (self , value ):
4848 self .factory .server_password = value
4949
50+ @property
51+ def username (self ):
52+ return self .factory .username
53+
54+ @username .setter
55+ def username (self , value ):
56+ self .factory .username = value
57+
58+ @property
59+ def realname (self ):
60+ return self .factory .realname
61+
62+ @realname .setter
63+ def realname (self , value ):
64+ self .factory .realname = value
65+
5066 @property
5167 def reloads (self ):
5268 return self .factory .reloads
@@ -451,17 +467,21 @@ class CardinalBotFactory(protocol.ClientFactory):
451467 """Maximum time in connections before reconnection attempt"""
452468
453469 def __init__ (self , network , server_password = None , channels = None ,
454- nickname = 'Cardinal' , password = None , plugins = None ,
455- storage = None ):
470+ nickname = 'Cardinal' , password = None , username = None ,
471+ realname = None , plugins = None , storage = None ):
456472 """Boots the bot, triggers connection, and initializes logging.
457473
458474 Keyword arguments:
459475 network -- A string containing the server to connect to.
460476 channels -- A list of channels to connect to.
461477 nickname -- A string with the nick to connect as.
462478 password -- A string with NickServ password, if any.
479+ username -- A string with the ident to be used.
480+ realname -- A string containing the real name field.
463481 plugins -- A list of plugins to load on boot.
482+ storage -- A string containing path to storage directory.
464483 """
484+
465485 if plugins is None :
466486 plugins = []
467487
@@ -471,9 +491,11 @@ def __init__(self, network, server_password=None, channels=None,
471491 self .logger = logging .getLogger (__name__ )
472492 self .network = network .lower ()
473493 self .server_password = server_password
474- self .password = password
475494 self .channels = channels
476495 self .nickname = nickname
496+ self .password = password
497+ self .username = username
498+ self .realname = realname
477499 self .plugins = plugins
478500 self .storage_path = storage
479501
0 commit comments