Op other people other places
authorpdbogen <pdbogen@088b83a4-0077-4247-935c-42ec02c2848b>
Thu, 7 Feb 2008 16:36:01 +0000 (16:36 +0000)
committerpdbogen <pdbogen@088b83a4-0077-4247-935c-42ec02c2848b>
Thu, 7 Feb 2008 16:36:01 +0000 (16:36 +0000)
git-svn-id: https://www.cernu.us/~pdbogen/svn/destult2@37 088b83a4-0077-4247-935c-42ec02c2848b

cmdaccess.yaml
commands.yaml

index 0125184..2a5e33f 100644 (file)
@@ -9,6 +9,7 @@ DIE: 2
 FLUSHURLS: 1
 IGNORE: 2
 JOIN: 1
+OP: 1
 OPME: 1
 PART: 1
 REGISTER: 0
index b189e8c..e549093 100644 (file)
@@ -176,6 +176,20 @@ RELOADCOMMANDS: |-
     }
   }
 
+OP: |-
+  sub {
+    my( $kernel, $heap, $who, $what, $src, $dest, $replypath ) = @_;
+    my @args = split( / /, $what );
+    if( $#args == 0 ) {
+      $kernel->post( $src, "do_mode", $dest, "+o ".$args[0] );
+      return 1;
+    }
+    if( $#args == 1 ) {
+      $kernel->post( $src, "do_mode", $args[1], "+o ".$args[0] );
+      return 1;
+    }
+    $kernel->post( $src, $replypath, "OP <username> [<channel>]", $dest );
+  }
 OPME: |-
   sub {
     my( $kernel, $heap, $who, $what, $src, $dest, $replypath ) = @_;