From a43fbffc82d57a411c2ce0920fbe0a29fb6dfb03 Mon Sep 17 00:00:00 2001 From: pdbogen Date: Thu, 7 Feb 2008 16:36:01 +0000 Subject: [PATCH] Op other people other places git-svn-id: https://www.cernu.us/~pdbogen/svn/destult2@37 088b83a4-0077-4247-935c-42ec02c2848b --- cmdaccess.yaml | 1 + commands.yaml | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/cmdaccess.yaml b/cmdaccess.yaml index 0125184..2a5e33f 100644 --- a/cmdaccess.yaml +++ b/cmdaccess.yaml @@ -9,6 +9,7 @@ DIE: 2 FLUSHURLS: 1 IGNORE: 2 JOIN: 1 +OP: 1 OPME: 1 PART: 1 REGISTER: 0 diff --git a/commands.yaml b/commands.yaml index b189e8c..e549093 100644 --- a/commands.yaml +++ b/commands.yaml @@ -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 []", $dest ); + } OPME: |- sub { my( $kernel, $heap, $who, $what, $src, $dest, $replypath ) = @_; -- 2.11.0