3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-17 23:52:49 +01:00

protocols: drop underscores from pre-defined opertypes

This commit is contained in:
James Lu 2016-03-26 13:15:22 -07:00
parent c71d2bfcb9
commit 19ac5b59a5
2 changed files with 4 additions and 4 deletions

View File

@ -508,7 +508,7 @@ class TS6Protocol(TS6BaseProtocol):
# Call the OPERED UP hook if +o is being added to the mode list.
if ('+o', None) in parsedmodes:
otype = 'Server_Administrator' if ('+a', None) in parsedmodes else 'IRC_Operator'
otype = 'Server Administrator' if ('+a', None) in parsedmodes else 'IRC Operator'
self.irc.callHooks([uid, 'CLIENT_OPERED', {'text': otype}])
# Set the accountname if present
@ -576,7 +576,7 @@ class TS6Protocol(TS6BaseProtocol):
utils.applyModes(self.irc, target, changedmodes)
# Call the OPERED UP hook if +o is being set.
if ('+o', None) in changedmodes:
otype = 'Server_Administrator' if ('a', None) in self.irc.users[target].modes else 'IRC_Operator'
otype = 'Server Administrator' if ('a', None) in self.irc.users[target].modes else 'IRC Operator'
self.irc.callHooks([target, 'CLIENT_OPERED', {'text': otype}])
return {'target': target, 'modes': changedmodes}

View File

@ -371,7 +371,7 @@ class UnrealProtocol(TS6BaseProtocol):
if ('+o', None) in parsedmodes:
# If +o being set, call the CLIENT_OPERED internal hook.
self.irc.callHooks([uid, 'CLIENT_OPERED', {'text': 'IRC_Operator'}])
self.irc.callHooks([uid, 'CLIENT_OPERED', {'text': 'IRC Operator'}])
if ('+x', None) not in parsedmodes:
# If +x is not set, update to use the person's real host.
@ -673,7 +673,7 @@ class UnrealProtocol(TS6BaseProtocol):
if ('+o', None) in parsedmodes:
# If +o being set, call the CLIENT_OPERED internal hook.
self.irc.callHooks([numeric, 'CLIENT_OPERED', {'text': 'IRC_Operator'}])
self.irc.callHooks([numeric, 'CLIENT_OPERED', {'text': 'IRC Operator'}])
self.checkCloakChange(numeric, parsedmodes)