summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/op.rb
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-02-10 08:56:19 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-02-10 08:56:19 +0000
commitf4d60499fd006fecb0414aef9e9c003f77c275ae (patch)
tree637349488f316e4830177c2fa843e40cbd920015 /data/rbot/plugins/op.rb
parent934fe86fcbc9e7e7409ed1657114f977be240fb8 (diff)
op plugin: fix hop and add voice
Diffstat (limited to 'data/rbot/plugins/op.rb')
-rw-r--r--data/rbot/plugins/op.rb28
1 files changed, 27 insertions, 1 deletions
diff --git a/data/rbot/plugins/op.rb b/data/rbot/plugins/op.rb
index 6967122f..5f6e9bff 100644
--- a/data/rbot/plugins/op.rb
+++ b/data/rbot/plugins/op.rb
@@ -34,7 +34,7 @@ class OpPlugin < Plugin
def hopme(m, params)
params[:user] = m.sourcenick
- op(m, params)
+ hop(m, params)
end
def dehop(m, params)
@@ -45,6 +45,28 @@ class OpPlugin < Plugin
def dehopme(m, params)
params[:user] = m.sourcenick
+ dehop(m, params)
+ end
+
+ def voice(m, params)
+ channel = params[:channel]
+ user = params[:user]
+ do_mode(m, channel, user, "+v")
+ end
+
+ def voiceme(m, params)
+ params[:user] = m.sourcenick
+ voice(m, params)
+ end
+
+ def devoice(m, params)
+ channel = params[:channel]
+ user = params[:user]
+ do_mode(m, channel, user, "-v")
+ end
+
+ def devoiceme(m, params)
+ params[:user] = m.sourcenick
deop(m, params)
end
@@ -84,5 +106,9 @@ plugin.map("hop [:user] [:channel]")
plugin.map("hopme [:channel]")
plugin.map("dehop [:user] [:channel]")
plugin.map("dehopme [:channel]")
+plugin.map("voice [:user] [:channel]")
+plugin.map("voiceme [:channel]")
+plugin.map("devoice [:user] [:channel]")
+plugin.map("devoiceme [:channel]")
plugin.default_auth("*",false)