Advertisement
swarley

AlphaChat UP/DOWN

Dec 21st, 2011
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 1.29 KB | None | 0 0
  1. use strict;
  2. use Xchat ':all';
  3.  
  4.  
  5. Xchat::register('AlphaChat Oper UP/DOWN Aliases', '1.0.0','Use /acup | /acdown for quick alphachat Up/Down for opers. Use /gup <network> | /gdown <network> for others.');
  6. Xchat::hook_command('acdown', 'acdown');
  7. Xchat::hook_command('acup', 'acup');
  8. Xchat::hook_command('gup', 'gup');
  9. Xchat::hook_command('gdown', 'gdown');
  10.  
  11. sub acup {
  12.     Xchat::set_context(undef, 'AlphaChat');
  13.     Xchat::command('BACK');
  14.     Xchat::command('MODE ' . Xchat::get_info('nick') . ' +h');
  15.     Xchat::command('CS UP #help');
  16. }
  17.  
  18. sub acdown {
  19.     Xchat::set_context(undef, 'AlphaChat');
  20.     Xchat::command('CS DOWN #help');
  21.     Xchat::command('MODE ' . Xchat::get_info('nick') . ' -h');
  22.     Xchat::command('AWAY I am currently not available. If you are in need of assistance, please join #Help and ask an available staffer.');
  23. }
  24.  
  25. sub gdown {
  26.     return unless $_[0][1];
  27.     Xchat::set_context(undef, $_[0][1]);
  28.     Xchat::command('CS DOWN #help');
  29.     Xchat::command('MODE ' . Xchat::get_info('nick') . ' -h');
  30.     Xchat::command('AWAY I am currently not available. If you are in need of assistance, please join #Help and ask an available staffer.');
  31. }
  32.  
  33. sub gup {
  34.     return unless $_[0][1];
  35.     Xchat::set_context(undef, $_[0][1]);
  36.     Xchat::command('BACK');
  37.     Xchat::command('MODE ' . Xchat::get_info('nick') . ' +h');
  38.     Xchat::command('CS UP #help');
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement