Luke081515 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/296425

Change subject: Implement hook "remove"
......................................................................

Implement hook "remove"

Kick is a brutal action... just remove the user, and he will not notice it....

Change-Id: Iad21049e8eb5503db2ab748e45ac032674b43df4
---
A bot_functions/remove.php
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/Luke081515IRCBot 
refs/changes/25/296425/1

diff --git a/bot_functions/remove.php b/bot_functions/remove.php
new file mode 100644
index 0000000..b9280fe
--- /dev/null
+++ b/bot_functions/remove.php
@@ -0,0 +1,9 @@
+<?php
+$bot->add_privmsg_hook($c . "remove", "ircbot_remove");
+function ircbot_kick($object, $params, $prefix, $channel) {
+       global $owner;
+       $nick = IRC::get_nick($prefix);
+       if ($nick == $owner)
+               $object->remove($channel . " " . $params);
+}
+?>
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/296425
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad21049e8eb5503db2ab748e45ac032674b43df4
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/Luke081515IRCBot
Gerrit-Branch: master
Gerrit-Owner: Luke081515 <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to