forked from Firepup650/FireBot
"CTCP" -> "kind" inside the CTCP function
This commit is contained in:
parent
f0d50170e3
commit
53b9194299
1 changed files with 8 additions and 8 deletions
16
bot.py
16
bot.py
|
@ -135,32 +135,32 @@ class bot:
|
||||||
if isRaw:
|
if isRaw:
|
||||||
sender = msg.split("!", 1)[0][1:]
|
sender = msg.split("!", 1)[0][1:]
|
||||||
message = msg.split("PRIVMSG", 1)[1].split(":", 1)[1].strip()
|
message = msg.split("PRIVMSG", 1)[1].split(":", 1)[1].strip()
|
||||||
CTCP = msg.split("\x01")[1].split(" ", 1)[0]
|
kind = msg.split("\x01")[1].split(" ", 1)[0]
|
||||||
self.log(f"Responding to CTCP {CTCP} from {sender}")
|
self.log(f"Responding to CTCP {kind} from {sender}")
|
||||||
if CTCP == "VERSION":
|
if kind == "VERSION":
|
||||||
self.notice(
|
self.notice(
|
||||||
f"\x01VERSION FireBot {__version__} (https://git.amcforum.wiki/Firepup650/fire-ircbot)\x01",
|
f"\x01VERSION FireBot {__version__} (https://git.amcforum.wiki/Firepup650/fire-ircbot)\x01",
|
||||||
sender,
|
sender,
|
||||||
True,
|
True,
|
||||||
)
|
)
|
||||||
return True
|
return True
|
||||||
elif CTCP == "USERINFO":
|
elif kind == "USERINFO":
|
||||||
self.notice("\x01USERINFO FireBot (Firepup's bot)\x01", sender, True)
|
self.notice("\x01USERINFO FireBot (Firepup's bot)\x01", sender, True)
|
||||||
return True
|
return True
|
||||||
elif CTCP == "SOURCE":
|
elif kind == "SOURCE":
|
||||||
self.notice(
|
self.notice(
|
||||||
"\x01SOURCE https://git.amcforum.wiki/Firepup650/fire-ircbot\x01",
|
"\x01SOURCE https://git.amcforum.wiki/Firepup650/fire-ircbot\x01",
|
||||||
sender,
|
sender,
|
||||||
True,
|
True,
|
||||||
)
|
)
|
||||||
return True
|
return True
|
||||||
elif CTCP == "FINGER":
|
elif kind == "FINGER":
|
||||||
self.notice("\x01FINGER Firepup's bot\x01", sender, True)
|
self.notice("\x01FINGER Firepup's bot\x01", sender, True)
|
||||||
return True
|
return True
|
||||||
elif CTCP == "CLIENTINFO":
|
elif kind == "CLIENTINFO":
|
||||||
self.notice(
|
self.notice(
|
||||||
"\x01CLIENTINFO ACTION VERSION USERINFO SOURCE FINGER\x01", sender, True
|
"\x01CLIENTINFO ACTION VERSION USERINFO SOURCE FINGER\x01", sender, True
|
||||||
)
|
)
|
||||||
return True
|
return True
|
||||||
self.log(f"Unknown CTCP {CTCP}")
|
self.log(f"Unknown CTCP {kind}")
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in a new issue