aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2018-04-10 21:18:53 +1200
committerDavid Phillips <david@sighup.nz>2018-04-10 21:29:11 +1200
commit9b397609f10d7b61282442ee081e3c1e23430a29 (patch)
tree58b987399e0c2f62db58c411ad470009173e00f0
parent13be301fab6a21e35b1203ced76e0036b8473e82 (diff)
downloadidalius-9b397609f10d7b61282442ee081e3c1e23430a29.tar.xz
Add puppet mode setting
Implements feature #2 on GitHub
-rw-r--r--README.md11
-rwxr-xr-xidalius.pl9
2 files changed, 20 insertions, 0 deletions
diff --git a/README.md b/README.md
index 1dd7017..19c220b 100644
--- a/README.md
+++ b/README.md
@@ -121,6 +121,17 @@ idalius to contact services like nickserv, memoserv, chanserv etc.
Not really useful apart from having a laugh in a channel. Really not sure why
I added this except for a lame gag or two. Worth it.
+### Set channel/user modes
+
+ mode #channel +v someone
+ mode #channel +vo someone opguy
+ mode #channel +n
+ mode #channel +l 5
+
+So on and so forth. What comes after "mode" is sent verbatim to the IRC client
+idalius wraps, which (as far as I know) sends it verbatim to the server. So
+you're really down to whatever the IRC server you're on will understand.
+
### Kick someone from a channel
kick #channel badPerson
diff --git a/idalius.pl b/idalius.pl
index 37073d4..ea276dd 100755
--- a/idalius.pl
+++ b/idalius.pl
@@ -284,6 +284,15 @@ sub irc_msg {
$irc->yield(privmsg => $nick => "Syntax: action <channel> <action text>");
}
}
+ if ($what =~ /^mode\s/) {
+ my ($rest) = $what =~ /^mode\s+(.*)?$/;
+ if ($rest) {
+ $irc->yield(mode => $rest);
+ $irc->yield(privmsg => $nick => "Requested.");
+ } else {
+ $irc->yield(privmsg => $nick => "Syntax: mode [everything]");
+ }
+ }
if ($what =~ /^kick\s/) {
my ($channel, $kickee, undef, $reason) = $what =~ /^kick\s+(\S+)\s(\S+)((?:\s)(.*))?$/;
if ($channel and $kickee) {