ident and realname config settings

This commit is contained in:
jacob1 2014-11-14 00:22:47 -05:00
parent 8c4281de94
commit dcae30a707
3 changed files with 7 additions and 4 deletions

View File

@ -4,6 +4,8 @@ HOST = "irc.freenode.net"
PORT = 6667
USERNAME = "" # for authentication, can be left blank if same as NICK
NICK = "mywolfbot"
IDENT = NICK
RNAME = NICK #realname/gecos, defaults to the same as the nick
CMD_CHAR = "!"
CHANGING_HOST_QUIT_MESSAGE = "Changing host"

View File

@ -191,7 +191,7 @@ class IRCClient(object):
self.cap("LS")
self.nick(self.nickname)
self.user(self.nickname, self.real_name)
self.user(self.ident, self.real_name)
if self.sasl_auth:
self.cap("REQ", "multi-prefix")
@ -283,9 +283,8 @@ class IRCClient(object):
self.msg("NickServ", "RELEASE "+self.nickname)
def ns_regain(self):
self.msg("NickServ", "REGAIN "+self.nickname)
def user(self, uname, rname):
self.send("USER", uname, self.host, self.host,
rname or uname)
def user(self, ident, rname):
self.send("USER", ident, self.host, self.host, ":{0}".format(rname or ident))
def mainLoop(self):
conn = self.connect()
while True:

View File

@ -61,6 +61,8 @@ def main():
authname=botconfig.USERNAME,
password=botconfig.PASS,
nickname=botconfig.NICK,
ident=botconfig.IDENT,
real_name=botconfig.RNAME,
sasl_auth=botconfig.SASL_AUTHENTICATION,
use_ssl=botconfig.USE_SSL,
connect_cb=modules.common.connect_callback