|
|
@@ -33,9 +33,9 @@ def do_command(self, connection, event):
|
|
|
print(1111)
|
|
|
if len(command.split()) == 2: # Stop silently if there is not exactly 1 argument.
|
|
|
print(22222)
|
|
|
- if command.split()[1] in self.channels.lower(): # Stop silently if thebot is not in the requested channel.
|
|
|
+ if command.split()[1] in self.channels: # Stop silently if thebot is not in the requested channel.
|
|
|
print(33333)
|
|
|
- connection.mode(command.split()[2], "+ohv " + event.source.nick + " " + event.source.nick + " " + event.source.nick)
|
|
|
+ connection.mode(command.split()[1], "+ohv " + event.source.nick + " " + event.source.nick + " " + event.source.nick)
|
|
|
|
|
|
elif command == "cmd" or command == "cmds" or command == "commands":
|
|
|
if cmdtype == "cmd":
|
|
|
@@ -322,6 +322,8 @@ def do_command(self, connection, event):
|
|
|
alphabet = string.ascii_letters + string.digits
|
|
|
password = ''.join(secrets.choice(alphabet) for i in range(20)) # 20-character password.
|
|
|
self.db.run("UPDATE networks SET password=%s WHERE name=%s", (password, self.network))
|
|
|
+ print(444)
|
|
|
connection.privmsg("NickServ", "REGISTER " + password + " " + trigger.split()[1])
|
|
|
else:
|
|
|
- connection.action("NickServ", "REGISTER " + self.db.one("SELECT password FROM networks WHERE name='" + self.network + "'") + " " + trigger.split()[1])
|
|
|
+ print(555)
|
|
|
+ connection.privmsg("NickServ", "REGISTER " + self.db.one("SELECT password FROM networks WHERE name='" + self.network + "'") + " " + trigger.split()[1])
|