#/#############################################################################\ ## Ongeboren's script collection - Wallops # ## Copyright (C) 2002 - 2005 ongeboren # ## Version: 2.1 # ## Requires: XChat 2.0.8+ # ## Distributed under the GPL license # #\#############################################################################/ sub onge_comm_o { if (length($_[1][1]) > 0) { Xchat::command( "OPERWALL :$_[1][1]" ); } else { $onge_use_operwall = 1; Xchat::print("Using OPERWALL from now on\n"); } return Xchat::EAT_ALL; } sub onge_comm_l { if (length($_[1][1]) > 0) { Xchat::command( "LOCOPS :$_[1][1]" ); } else { $onge_use_operwall = 0; Xchat::print("Using LOCOPS from now on\n"); } return Xchat::EAT_ALL; } sub onge_parse_wallops_input { my $serv = Xchat::get_info ( "server" ); if ( Xchat::find_context() == Xchat::find_context($onge_tabs_wall, $serv) ) { if ($onge_use_operwall) { Xchat::command("OPERWALL :$_[1][0]"); } else { Xchat::command("LOCOPS :$_[1][0]"); } return Xchat::EAT_ALL; } } sub onge_parse_wallops_output { my $srce = $_[0][0]; $srce =~ /:(\S+)!/; if ($1) { $srce = $1; } my $serv = Xchat::get_info ( "server" ); if ($_[0][2] eq ":LOCOPS") { onge_misc_emit_print ( $onge_tabs_wall, $serv, $srce, "\002\0037LOCOPS\003\002 $_[1][4]" ); } elsif ($_[0][2] eq ":SLOCOPS") { onge_misc_emit_print ( $onge_tabs_wall, $serv, $srce, "\002\0037SLOCOPS\003\002 $_[1][4]" ); } elsif ($_[0][2] eq ":WALLOPS") { onge_misc_emit_print ( $onge_tabs_wall, $serv, $srce, "\002WALLOPS\002 \0034$_[1][4]\003" ); } elsif ($_[0][2] eq ":OPERWALL") { onge_misc_emit_print ( $onge_tabs_wall, $serv, $srce, "\002\0033OPERWALL\003\002 $_[1][4]" ); } else { my $txt = substr ($_[1][2], 1); $srce = substr($srce, 1); onge_misc_emit_print ( $onge_tabs_wall, $serv, $srce, "\002WALLOPS\002 \0034$txt\003" ); } return Xchat::EAT_ALL; } Xchat::print( "\0033 Wallops : loaded\003\n" ); 1;