AfterNET IRC Network/Channel Service Addon — File Browser

AfterNETIRCNetworkChannelServiceAddonv1.0 / AfterNETIRCNetworkChannelServiceAddonv1.0 / ppanet.mrc

ppanet.mrc — 16.47 KB — Download this file

; Peace & Protection AfterNET IRC Network/Channel Service Addon
;------
; Author - Atma
; email - reed@afternet.org
; irc - irc.newnet.net #mIRC, irc.afternet.org #raHzone/#AfterNET
;------

;enables/disables X2 popups
on 1:START:.disable #anet.X2pop
on 1:CONNECT:if (%pp.net == AfterNet) { .enable #anet.X2pop }
on 1:DISCONNECT:if (%pp.net == AfterNet) { .disable #anet.X2pop | set %anet.oper }
on 1:USERMODE:if (o isin $usermode) { set %anet.oper Oper Commands } | else { set %anet.oper }

alias anet.setbotnick _pentry anet.setbotnick2 What is the name of your "X2" bot?
alias anet.setbotnick2 set %anet.botnick $1

;loading & unloading the addon
alias anet.loadaon set %anet.favserv none | if (%pp.net == AfterNet) { .enable #anet.X2pop } | anet.setbotnick
alias anet.unload unset %anet.*

;toggles & simple option changes
alias anet.addfserv set %anet.favserv $1- | dispa Your favorite AfterNET server is now %anet.favserv
alias anet.setgmask set %.anet.glinemask $1 | anet.sendgline -2
alias anet.setgtime set %.anet.glinetime $1 | anet.sendgline -3
alias anet.setgreason set %.anet.glinereason $1- | anet.sendgline -4
alias anet.x2sendglobal .msg %anet.botnick global $1-
alias anet.xset.maxclones .msg %anet.botnick xset maxclones $1
alias anet.xset.cloneres .msg %anet.botnick xset cloneres $1
alias anet.xset.autorouting .msg %anet.botnick xset autorouting $1
alias anet.xset.autoconnect .msg %anet.botnick xset autoconnect $1
alias anet.xset.debug .msg %anet.botnick xset debug $1
alias anet.xset.dbtarget .msg %anet.botnick xset dbtarget $1
alias enx2 .enable #anet.x2pop | dispa AfterNET Channel Service Popups Loaded
alias unx2 .disable #anet.x2pop | dispa AfterNET Channel Service Popups Unloaded

;misc X2 aliases that require only one line
alias anet.x2spoofserv dispa Spoofing server: $1 | .msg %anet.botnick spoofserv $1
alias anet.x2quit dispa Asking %anet.botnick to QUIT! | .msg %anet.botnick quit $1-
alias anet.x2whois dispa Requesting Info on $1 | .msg %anet.botnick whois $1
alias anet.setinfo .msg %anet.botnick setinfo %.anet.chan $1-
alias anet.delop .msg %anet.botnick delop $chan $1-
alias anet.delmaster .msg %anet.botnick delmaster $chan $1-
alias anet.x2op .msg X2 op %.anet.chan $1-
alias anet.x2deop .msg X2 deop %.anet.chan $1-
alias anet.delban .msg %anet.botnick delban $chan $1
alias anet.fdelban .msg %anet.botnick fdelban $chan $1
alias anet.fdelop .msg %anet.botnick fdelop $chan $1
alias anet.fdelmaster .msg %anet.botnick fdelmaster $chan $1
alias anet.fdelowner .msg %anet.botnick fdelowner $chan $1
alias anet.setmode .msg %anet.botnick set $chan mode $1
alias anet.settopic .msg %anet.botnick set $chan topic $1-
alias anet.ub .msg %anet.botnick ub $chan $1-

;authorize locally (channel must be active window)
alias anet.sendlauth _pentry anet.sendlauth2 Password to authorize with?
alias anet.sendlauth2 .msg %anet.botnick auth %.anet.authchan $1

;seen a user?
alias anet.seenuser _pentry anet.seenuser2 User to look up? (Must be on channel userlist)
alias anet.seenuser2 .msg %anet.botnick seen %.anet.seenchan $1

;regchan & unreg
alias anet.regchan .msg %anet.botnick regchan $1 $1
alias anet.unregchan .msg %anet.botnick unreg $1

;add owner to channel
alias anet.addowner _pentry anet.addowner2 Nick/Mask to record user by?
alias anet.addowner2 set %.anet.ownermask $1 | _pentry anet.addowner3 Channel to add owner to?
alias anet.addowner3 { 
  set %.anet.ownerchan $1
  if (*! == $left(%.anet.ownermask,2)) { _pentry anet.addowner4 Handle to record user by? }
  else { .msg %anet.botnick addowner %.anet.ownerchan %.anet.ownermask }
}
alias anet.addowner4 .msg %anet.botnick addowner %.anet.ownerchan %.anet.ownermask $1

;delete owner from channel
alias anet.delowner set %.anet.ownermask $1 | _pentry anet.delowner2 Channel to delete owner from?
alias anet.delowner2 set %.anet.ownerchan $1 | .msg %anet.botnick delowner %.anet.ownerchan %.anet.ownermask

;add an op to channel
alias anet.addop set %.anet.opmask $1 | if (*! == $left($1,2)) {  _pentry anet.addop2 Nick to record user by? } | else { anet.addop2 }
alias anet.addop2 .msg %anet.botnick addop $chan %.anet.opmask $1

;Ditto for masters
alias anet.addmaster set %.anet.opmask $1 | if (*! == $left($1,2)) {  _pentry anet.addop2 Nick to record user by? } | else { anet.addmaster2 } 
alias anet.addmaster2 .msg %anet.botnick addmaster $chan %.anet.opmask $1

;Setting handles & such
alias anet.sethandle set %.anet.opmask $1 | _pentry anet.sethandle2 New handle for %.anet.opmask $+ ?  
alias anet.sethandle2 .msg %anet.botnick sethandle $chan %.anet.opmask $1

;Adding permbans
alias anet.addban set %.anet.opmask $1 | _pentry anet.addban2 Reason for ban on %.anet.opmask $+ ?  
alias anet.addban2 .msg %anet.botnick addban $chan %.anet.opmask $1-

;Kick/kickbans
alias anet.kick set %.anet.kicknick $1 | _pentry anet.kick2 Reason to kick $1 $+ ?
alias anet.kick2 .msg %anet.botnick kick $chan %.anet.kicknick $1-
alias anet.kb set %.anet.kicknick $1 | _pentry anet.kb2 Reason to kickban $1 $+ ?
alias anet.kb2 .msg %anet.botnick kb $chan %.anet.kicknick $1-

;asks X2 to issue a gline
alias anet.sendgline {
  if (-1 == $1) {  _pentry anet.setgmask Mask to Gline? }
  elseif (-2 == $1) { _pentry anet.setgtime Duration (in #:time format [1:day, 300:min, etc..]) }
  elseif (-3 == $1) { _pentry anet.setgreason Reason to gline for? }
  elseif (-4 == $1) { .msg %anet.botnick gline %.anet.glinemask %.anet.glinetime %.anet.glinereason }
  else { _error Not implemented yet }
}

;the magical 8ball
alias anet.ask8ball _pentry anet.ask8ball2 What do you wish to ask the magical 8ball?
alias anet.ask8ball2 .msg %anet.botnick 8ball %.anet.8ballchan $1-

alias anet.rolldice _pentry anet.rolldice2 How many sides is our die gonna have?
alias anet.rolldice2 .msg %anet.botnick d %.anet.dicechan $1

;promotional AfterNET popups for status window (hey it's written for AfterNET :P)
menu status,menubar {
  -
  AfterNET
  .Server Listing
  ..Random Server:.server irc.afternet.org 6667
  ..-
  ..US
  ...Charleston, West Virginia:.server newwave.afternet.org 6667
  ...Ashland, Wisconsin:.server asp.afternet.org 6667
  ...Dallas, Texas:.server crypto.afternet.org 6667
  ...St. Louis, Missouri:.server gargoyle.afternet.org 6667
  ...Portsmouth, Ohio:.server entuluva.afternet.org 6667
  ..Canada
  ...Vancover, British Columbia:.server infinet.ca.afternet.org 6667
  ..EU
  ...Amsterdam, Netherlands:.server frodo.afternet.org 6667
  ...London, England:.server digitald.uk.afternet.org 6667
  ..-
  ..Fav Server
  ...Show Favorite Server { if (%anet.favserv == none) { dispa You do not have a favorite AfterNET Server } | else { dispa Your favorite AfterNET server is  $+ %anet.favserv } }
  ...Set New Favorite Server:_pentry anet.addfserv What is your new favorite AfterNET Server? (port optional)
  ...Connect to Favorite Server:.server %anet.favserv
  .-
  .Channels
  ..Most Popular
  ...#AfterNET:join #afternet
  ...#ChatZone:join #chatzone
  ...#Beginner:join #beginner
  ...#Help:join #help
  ...#rAiNbOwRoOm:join #rainbowroom
  ...#raHzone:join #raHzone
  ..Other:_pentry join What channel do you want to join?
}  

#anet.X2pop on
menu channel {
  -
  X2
  .Basic Commands
  ..Access:.msg %anet.botnick access $chan
  ..Authorize:set %.anet.authchan $chan | anet.sendlauth
  ..Seen:set %.anet.seenchan $chan | anet.seenuser
  ..Who Am I?:.msg %anet.botnick whoami
  ..-
  ..Map:.msg %anet.botnick map
  ..Netstat:.msg %anet.botnick netstat
  ..Chanstat:.msg %anet.botnick chanstat $chan
  ..Settings:.msg %anet.botnick settings
  ..-
  ..8ball:set %.anet.8ballchan $chan | anet.ask8ball
  ..Dice:set %.anet.dicechan $chan | anet.rolldice
  .Channel Commands
  ..Userlist Commands
  ...List Users
  ....Ops              [Op]:.msg %anet.botnick olist $chan
  ....Masters       [None]:.msg %anet.botnick mlist $chan
  ....Owner         [None]:.msg %anet.botnick wlist $chan
  ....Entire List  [Op]:.msg %anet.botnick userlist $chan
  ....-
  ....Bans            [Op]:.msg %anet.botnick blist $chan
  ...Management
  ....Add
  .....Op        [Master]:_pentry anet.addop Nick/Mask to add to $chan $+ ?
  .....Master [Owner]:_pentry anet.addmaster Nick/Mask to add to $chan $+ ?
  .....Ban      [Master]:_penty anet.addban Nick/Mask to ban in $chan $+ ?
  ....Delete
  .....Op        [Master]:_pentry anet.delop Nick/Mask to delete from $chan $+ ?
  .....Master [Owner]:_pentry anet.delmaster Nick/Mask to delete from $chan $+ ?
  .....Ban       [Master]:_pentry anet.delban Nick/Mask to delete from $chan $+ ?
  .....-
  .....By String
  ......Op        [Master]:_pentry anet.fdelop Mask to filter delete from $chan $+ ?
  ......Master [Owner]:_pentry anet.fdelmaster Mask to filter delete from $chan $+ ?
  ......Ban       [Master]:_pentry anet.fdelban Mask to filter delete from $chan $+ ?
  ..Common Commands
  ...Refresh Topic   [Op]:.msg %anet.botnick topic $chan
  ...Refresh Mode   [Op]:.msg %anet.botnick mode $chan
  ...-
  ...Op User             [Op]:set %.anet.chan $chan | _pentry anet.x2op User(s) to op in $chan $+ ?
  ...Deop User         [Op]:set %.anet.chan $chan | _pentry anet.x2deop User(s) to deop in $chan $+ ?
  ...Kick User          [Op]:_pentry anet.kick User to kick from $chan $+ ?
  ...Kickban User    [Op]:_pentry anet.kb User to kickban from $chan $+ ?
  ...-
  ...Op Self             [Op]:.msg %anet.botnick up $chan
  ...Deop Self         [Op]:.msg %anet.botnick down $chan
  ...-
  ...Set Infoline     [Op]:set %.anet.chan $chan | _pentry anet.setinfo Infoline to set?
  ...Set Handle        [Master]:set %.anet.chan $chan | _pentry anet.sethandle User/Mask to switch handles for?
  ...Toggle Autoop  [Op]:.msg %anet.botnick togop $chan
  ...Reset Password [Master]:_pentry anet.resetpass Nick/Mask to reset password on?
  ...-
  ...Unban                 [Op]
  ....Self:.msg %anet.botnick ubm $chan
  ....All:.msg %anet.botnick uba $chan
  ....Nick/Mask:_pentry anet.ub Nick/Mask to unban in $chan $+ ?
  ..Settings [Master]
  ...Mode:_pentry anet.setmode Mode to lock on $chan $+ ?
  ...Topic:_pentry anet.settopic Topic to set on $chan $+ ?
  ...-
  ...Topic Refresh Frequency
  ....Never:.msg %anet.botnick set $chan topicfreq 0
  ....Once a day:.msg %anet.botnick set $chan topicfreq 1
  ....Twice a day:.msg %anet.botnick set $chan topicfreq 2
  ....Every 4 hours:.msg %anet.botnick set $chan topicfreq 3
  ....Once an hour:.msg %anet.botnick set $chan topicfreq 4
  ...Strict Ops
  ....Anyone can be opped:.msg %anet.botnick set $chan strictops 0
  ....Only people on userlist:.msg %anet.botnick set $chan strictops 1
  ....Only Masters and Owners:.msg %anet.botnick set $chan strictops 2
  ...Auto Op
  ....No one:.msg %anet.botnick set $chan autoop 0
  ....Only Masters and Owners:.msg %anet.botnick set $chan autoop 1
  ....People on userlist:.msg %anet.botnick set $chan autoop 2
  ....Everyone:.msg %anet.botnick set $chan autoop 3
  ...Protect Level
  ....No one from any one:.msg %anet.botnick set $chan protect 0
  ....Userlist from people of lower rank:.msg %anet.botnick set $chan protect 1
  ....Userlist from people of equal and lower rank:.msg %anet.botnick set $chan protect 2
  ....Masters and Owners from anyone:.msg %anet.botnick set $chan protect 3
  ....Owners from anyone:.msg %anet.botnick set $chan protect 4
  ...Protect Reaction
  ....Left unharmed (Off):.msg %anet.botnick set $chan protlev 0
  ....Deopped:.msg %anet.botnick set $chan protlev 1
  ....Kicked:.msg %anet.botnick set $chan protlev 2
  ....Kickbanned:.msg %anet.botnick set $chan protlev 3
  ....Handled "Eye for an Eye":.msg %anet.botnick set $chan protlev 4
  ...When Banlist Users join:
  ....Leave them be:.msg %anet.botnick set $chan banmode 0
  ....Bring to ops attention:.msg %anet.botnick set $chan banmode 1
  ....Kick:.msg %anet.botnick set $chan banmode 2
  ....Ban (No Kick):.msg %anet.botnick set $chan banmode 3
  ....Kickban:.msg %anet.botnick set $chan banmode 4
  ...Public Commands
  ....Ignore:.msg %anet.botnick set $chan public 0
  ....Acknowledge:.msg %anet.botnick set $chan public 1
  ...Priv. to Override Mode
  ....Anyone:.msg %anet.botnick set $chan enfmodes 0
  ....Userlist:.msg %anet.botnick set $chan enfmodes 1
  ....Masters and Owners:.msg %anet.botnick set $chan enfmodes 2
  ...Op "Nonauthed" Users
  ....Yes:.msg %anet.botnick set $chan passmode 1
  ....No:.msg %anet.botnick set $chan passmode 0
  ...Auto remove Bans
  ....Never:.msg %anet.botnick set $chan bantimeout 0
  ....10 Min:.msg %anet.botnick set $chan bantimeout 1
  ....2 Hours:.msg %anet.botnick set $chan bantimeout 2
  ....4 Hours:.msg %anet.botnick set $chan bantimeout 3
  ....1 Day:.msg %anet.botnick set $chan bantimeout 4
  ....1 Week:.msg %anet.botnick set $chan bantimeout 5
  .%anet.oper
  ..Glines
  ...Show Glines:.msg %anet.botnick glines
  ...Reset Glines:.msg %anet.botnick setglines
  ...Issue Gline:anet.sendgline -1
  ..Channels  
  ...Regchan:_pentry anet.regchan Channel to register?
  ...Unreg:_pentry anet.unregchan Channel to unregister?
  ...-
  ...Add Owner:anet.addowner
  ...Del Owner
  ....Single:_pentry anet.delowner Nick/Mask to remove from $chan $+ ?
  ....Filter:_pentry anet.fdelowner Nick/Mask to filter delete from $chan $+ ?
  ...-
  ...Global {
    set %.anet.yesno $?!="This will send to all channels, are you sure you want to?" 
    if (%.anet.yesno == $false) { halt } | elseif (%.anet.yesno == $true) { _pentry anet.x2sendglobal What's the message to send? } 
    else { halt }
  }
  ..Misc
  ...Xset
  ....View Settings:.msg %anet.botnick xset
  ....-
  ....MAXCLONES:_pentry anet.xset.maxclones How many clones should %anet.botnick react on (based on ident@domain)
  ....CLONERES:_pentry anet.xset.cloneres How should %anet.botnick respond to clones (0: nothing, 1: warn ircops, 2: kill, 3:gline)
  ....AUTOROUTING:_pentry anet.xset.autorouting Should %anet.botnick autoroute servers? (0: no 1: yes)
  ....AUTOCONNECT:_pentry anet.xset.autoconnect Should %anet.botnick auto connect after getting squit from the network? (0: no 1: yes)
  ....DEBUG:_pentry anet.xset.debug What should the debug level be set at? (0: everything, 60: nothing)
  ....DBTARGET:set %.anet.x2alert $_s2p(WARNING: Do NOT abuse this feature of X2, it is a violation of users privacy!) | _alert WARNING! $_p2s(%.anet.x2alert) | _pentry anet.xset.dbtarget Who should get the debug information?
  ...-
  ...WhoIs:_pentry anet.x2whois Which user do you want to get info about?
  ...Rejoin:dispa Asking %anet.botnick to rejoin all channels | .msg %anet.botnick rejoin
  ...SpoofServ:_pentry anet.x2spoofserv What server shall I spoof?
  ...-
  ...Routing Map:.msg %anet.botnick routing
  ...Reroute:.msg %anet.botnick reroute
  ...-
  ...Suspend {
    set %.anet.yesno $?!="This will squit %anet.botnick from the network, are you SURE you want to do this?"
    if (%.anet.yesno == $false) { halt } | elseif (%.anet.yesno == $true) { dispa Asking %anet.botnick to be suspended! | .msg %anet.botnick suspend }
    else { halt }
  }
  ...Quit {
    set %.anet.yesno $?!="This will squit %anet.botnick from the network, are you SURE you want to do this?"
    if (%.anet.yesno == $false) { halt } | elseif (%.anet.yesno == $true) { _pentry anet.x2quit Quit Reason? }
    else { halt }
  }
}

menu nicklist {
  -
  X2
  .Check Access    [None]:.msg %anet.botnick access $chan $1
  .Change Handle  [Master]:set %.anet.opmask $1 | _pentry anet.sethandle2 New handle for %.anet.opmask $+ ?
  .Reset Password [Master]:.msg %anet.botnick resetpass $chan $1
  .-
  .Op                      [Op]:.msg %anet.botnick op $chan $1
  .Deop                  [Op]:.msg %anet.botnick deop $chan $1
  .Kick                   [Op]:set %.anet.opmask $1 | _pentry anet.kick2 Reason to kick %.anet.opmask $+ ?
  .Kickban             [Op]:set %.anet.opmask $1 | _pentry anet.kb2 Reason to kickban %.anet.opmask $+ ?
  .-
  .Add to Userlist
  ..Op        [Master]:.msg %anet.botnick addop $chan $1
  ..Master [Owner]:.msg %anet.botnick addmaster $chan $1
  ..Owner  [IRCop]:.msg %anet.botnick addowner $chan $1
  ..Ban       [Master]:set %.anet.opmask $1 | _pentry anet.addban2 Reason to ban %.anet.opmask $+ ?
  .Delete from Userlist
  ..Op        [Master]:.msg %anet.botnick delop $chan $1
  ..Master [Owner]:.msg %anet.botnick delmaster $chan $1
  ..Owner  [IRCop]:.msg %anet.botnick delowner $chan $1
  ..Ban       [Master]:.msg %anet.botnick delban $chan $1
  .-
  .Gline                   [IRCop]:set %.anet.glinemask $remove($address($1,2),*!) | anet.sendgline -2
}
#anet.X2pop end