From f4d60499fd006fecb0414aef9e9c003f77c275ae Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sat, 10 Feb 2007 08:56:19 +0000 Subject: op plugin: fix hop and add voice --- data/rbot/plugins/op.rb | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'data/rbot/plugins') 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) @@ -44,6 +44,28 @@ class OpPlugin < Plugin end 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) -- cgit v1.2.3