Public paste
Undefined
By: lol | Date: Dec 9 2006 22:44 | Format: None | Expires: never | Size: 1.79 KB | Hits: 1381

  1. on *:text:request*:?:{
  2.   if (%request) {
  3.     if ($2) && ($3) && ($4) {
  4.       set -u15 %request 1
  5.       set %request.nick $nick
  6.       set %request.chan $2
  7.       set %request.bot $3
  8.       set %request.email $4
  9.       if (@ isin $4) {
  10.         if (%request.bot != hoi) {
  11.           notice %request.nick Error, %request.bot is not a valid bot!
  12.           notice %request.nick Try again using a valid #ChannelBots nick.
  13.           close -m $nick
  14.           halt
  15.         }
  16.         else {        
  17.           join %request.chan
  18.           checkop
  19.         }
  20.       }
  21.       else { notice %request.nick Wrong usage! | halt }
  22.     }
  23.     else { notice $nick Wrong usage! }
  24.   }
  25.   else { halt }
  26. }
  27.  
  28. alias checkop {
  29.   if (%request.nick isop %request.chan) {
  30.     checkbot
  31.   }
  32.   else {
  33.     notice $nick Error, you are not opped at the specified channel. Parting now.
  34.     part %request.chan REQUEST FAILED!
  35.   }
  36. }
  37.  
  38. alias checkbot {
  39.   if (Q ison %request.chan) || (L ison %request.chan) {
  40.     approve
  41.   }
  42.   else {
  43.     notice $nick You have not a Quakenet Service at the specified channels. Parting now.
  44.     part %request.chan REQUEST FAILED!
  45.   }
  46. }
  47.  
  48. alias approve {
  49.   writeini requests.ini nick %request.chan %request.nick
  50.   writeini requests.ini chan %request.chan %request.chan
  51.   writeini requests.ini bot %request.chan %request.nick
  52.   writeini requests.ini email %request.chan %request.nick
  53.   notice %request.nick Your request is ok.
  54.   notice %request.nick The requested bot %request.bot will join in a moment. Note: A #ChannelBots admin will check the channel again to be sure it meets all the requirements.
  55.   msg #biggie.dev Request: %request.nick requested %request.bot for %request.chan $+ . Email: %request.email (Please approve the channel)
  56.   part %request.chan Request is OK!
  57.   halt
  58. }