Merge pull request #3349 from volundmush/command_msg
Default Commands now use self.msg() instead of self.caller.msg()
This commit is contained in:
commit
a928e418a2
9 changed files with 72 additions and 74 deletions
|
|
@ -312,7 +312,7 @@ class CmdChannel(COMMAND_DEFAULT_CLASS):
|
|||
|
||||
"""
|
||||
if not channel.access(self.caller, "send"):
|
||||
self.caller.msg(f"You are not allowed to send messages to channel {channel}")
|
||||
self.msg(f"You are not allowed to send messages to channel {channel}")
|
||||
return
|
||||
|
||||
# avoid unsafe tokens in message
|
||||
|
|
@ -1684,21 +1684,21 @@ class CmdIRCStatus(COMMAND_DEFAULT_CLASS):
|
|||
chtext = f"IRC bot '{ircbot.db.irc_botname}' on channel {channel} ({network}:{port})"
|
||||
if option == "ping":
|
||||
# check connection by sending outself a ping through the server.
|
||||
self.caller.msg(f"Pinging through {chtext}.")
|
||||
self.msg(f"Pinging through {chtext}.")
|
||||
ircbot.ping(self.caller)
|
||||
elif option in ("users", "nicklist", "who"):
|
||||
# retrieve user list. The bot must handles the echo since it's
|
||||
# an asynchronous call.
|
||||
self.caller.msg(f"Requesting nicklist from {channel} ({network}:{port}).")
|
||||
self.msg(f"Requesting nicklist from {channel} ({network}:{port}).")
|
||||
ircbot.get_nicklist(self.caller)
|
||||
elif self.caller.locks.check_lockstring(
|
||||
self.caller, "dummy:perm(ircstatus) or perm(Developer)"
|
||||
):
|
||||
# reboot the client
|
||||
self.caller.msg(f"Forcing a disconnect + reconnect of {chtext}.")
|
||||
self.msg(f"Forcing a disconnect + reconnect of {chtext}.")
|
||||
ircbot.reconnect()
|
||||
else:
|
||||
self.caller.msg("You don't have permission to force-reload the IRC bot.")
|
||||
self.msg("You don't have permission to force-reload the IRC bot.")
|
||||
|
||||
|
||||
# RSS connection
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue