diff --git a/docs/technical/pmodule-spec.md b/docs/technical/pmodule-spec.md index b7cdd2d..f9a7c77 100644 --- a/docs/technical/pmodule-spec.md +++ b/docs/technical/pmodule-spec.md @@ -48,9 +48,9 @@ internals](https://github.com/GLolol/PyLink/blob/0.4.0-dev/classes.py#L267-L272) - **`invite`**`(self, source, target, channel)` - Sends an INVITE from a PyLink client. -- **`kickClient`**`(self, source, channel, target, reason=None)` - Sends a kick from a PyLink client. +- **`kick`**`(self, source, channel, target, reason=None)` - Sends a kick from a PyLink client. -- **`kickServer`**`(self, source, channel, target, reason=None)` - Sends a kick from a PyLink server. +- **`kick`**`(self, source, channel, target, reason=None)` - Sends a kick from a PyLink server. - **`killClient`**`(self, source, target, reason)` - Sends a kill from a PyLink client. diff --git a/plugins/opercmds.py b/plugins/opercmds.py index beea06e..f97eabc 100644 --- a/plugins/opercmds.py +++ b/plugins/opercmds.py @@ -134,7 +134,7 @@ def kick(irc, source, args): if irc.isInternalServer(u): # Send kick from server if the given kicker is a SID - irc.proto.kickServer(u, channel, targetu, reason) + irc.proto.kick(u, channel, targetu, reason) elif u not in irc.users: # Whatever we were told to send the kick from wasn't valid; try to be # somewhat user friendly in the error. message @@ -148,7 +148,7 @@ def kick(irc, source, args): irc.reply("Error: No such nick '%s'." % target) return else: - irc.proto.kickClient(u, channel, targetu, reason) + irc.proto.kick(u, channel, targetu, reason) irc.callHooks([u, 'CHANCMDS_KICK', {'channel': channel, 'target': targetu, 'text': reason, 'parse_as': 'KICK'}]) diff --git a/plugins/relay.py b/plugins/relay.py index ebbdf68..bea7875 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -836,7 +836,7 @@ def handle_kick(irc, source, command, args): # Propogate the kick! if real_kicker: log.debug('(%s) Relay kick: Kicking %s from channel %s via %s on behalf of %s/%s', irc.name, real_target, remotechan,real_kicker, kicker, irc.name) - remoteirc.proto.kickClient(real_kicker, remotechan, real_target, args['text']) + remoteirc.proto.kick(real_kicker, remotechan, real_target, args['text']) else: # Kick originated from a server, or the kicker isn't in any # common channels with the target relay network. @@ -850,7 +850,7 @@ def handle_kick(irc, source, command, args): text = "(%s/%s) %s" % (kname, irc.name, args['text']) except AttributeError: text = "(@%s) %s" % (irc.name, args['text']) - remoteirc.proto.kickServer(rsid, remotechan, real_target, text) + remoteirc.proto.kick(rsid, remotechan, real_target, text) # If the target isn't on any channels, quit them. if remoteirc != irc and (not remoteirc.users[real_target].channels) and not origuser: diff --git a/tests/test_coreplugin.py b/tests/test_coreplugin.py index 451b01b..518eee6 100644 --- a/tests/test_coreplugin.py +++ b/tests/test_coreplugin.py @@ -30,7 +30,7 @@ class CorePluginTestCase(tests_common.PluginTestCase): self.assertNotEqual(self.irc.pseudoclient.uid, spmain[0]['olduser']) def testKickRejoin(self): - self.proto.kickClient(self.u, '#pylink', self.u, 'test') + self.proto.kick(self.u, '#pylink', self.u, 'test') msgs = self.irc.takeMsgs() commands = self.irc.takeCommands(msgs) self.assertIn('FJOIN', commands) diff --git a/tests/tests_common.py b/tests/tests_common.py index 62a0888..6956a2e 100644 --- a/tests/tests_common.py +++ b/tests/tests_common.py @@ -37,7 +37,7 @@ class CommonProtoTestCase(PluginTestCase): self.proto.join(target, '#pylink') self.assertIn(self.u, self.irc.channels['#pylink'].users) self.assertIn(target, self.irc.channels['#pylink'].users) - self.proto.kickClient(self.u, '#pylink', target, 'Pow!') + self.proto.kick(self.u, '#pylink', target, 'Pow!') self.assertNotIn(target, self.irc.channels['#pylink'].users) def testModeClient(self):