Jump to content

chain

Administrators
  • Posts

    5,984
  • Joined

  • Last visited

  • Days Won

    17

Posts posted by chain

  1. # $Id: autoreply.tcl,v1.7 18/01/2016 03:33:45am GMT +13 (NZDST) IRCSpeed Exp $
    
    # Commands are; !talkz on|off
    #               /msg botnick talkz #channel on|off
    # Feel free to edit the trigger, the reply flags and thankstext/complaintext. Add heaps of replies, or have a few, it's up to you.
    
    # Feel free to edit this setting. Change the ! to any character you would like as a trigger.
    set replytrig "!"
    
    # Set here what flags you wish to allow and trigger this script (leave it "" for anyone)
    set replyflags "ovf|ovf"
    
    # Set here the text to thank the user who voiced you.
    set thankstext {
      "Thanks for the $mode $nick"
      "wow.. thanks, $nick"
      "cool, thank you! I _LOVE_ $chan!!"
    }
    
    # Set here the text to complain about being devoiced.
    set complaintext {
      "awww, man! why me, $nick?!"
      "pfft, be that way, /hop"
      "wait until I tell .."
      "hmm, stop it."
    }
    
    ########## ----- NO EDITING BELOW ----- ##########
    proc getReplyTrig {} {
     global replytrig
     return $replytrig
    }
    
    setudef flag talkz
    
    bind mode - "% +o" op:check
    bind mode - "% -o" deop:check
    bind mode - "% +v" voice:check
    bind mode - "% -v" devoice:check
    bind pub - ${replytrig}talkz talkz:pub
    bind msg - talkz talkz:msg
    
    proc talkz:pub {nick uhost hand chan arg} {
      global replyflags
      if {[matchattr [nick2hand $nick] $replyflags $chan]} {
        if {[lindex [split $arg] 0] == ""} {putquick "PRIVMSG $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getReplyTrig]talkz on|off"; return}
    
        if {[lindex [split $arg] 0] == "on"} {
          if {[channel get $chan talkz]} {putquick "PRIVMSG $chan :\037ERROR\037: This setting is already enabled."; return}
          channel set $chan +talkz
          puthelp "PRIVMSG $chan :Enabled Autoreply Thanks System for $chan"
          return 0
        }
    
        if {[lindex [split $arg] 0] == "off"} {
          if {![channel get $chan talkz]} {putquick "PRIVMSG $chan :\037ERROR\037: This setting is already disabled."; return}
          channel set $chan -talkz
          puthelp "PRIVMSG $chan :Disabled Autoreply Thanks System for $chan"
          return 0
        }
      }
    }
    
    proc talkz:msg {nick uhost hand arg} {
      global botnick replyflags
      set chan [strlwr [lindex [split $arg] 0]]
      if {[matchattr [nick2hand $nick] $replyflags $chan]} {
        if {[lindex [split $arg] 0] == ""} {putquick "NOTICE $nick :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: /msg $botnick talkz #channel on|off"; return}
        if {[lindex [split $arg] 1] == ""} {putquick "NOTICE $nick :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: /msg $botnick talkz $chan on|off"; return}
    
        if {[lindex [split $arg] 1] == "on"} {
          if {[channel get $chan talkz]} {putquick "NOTICE $nick :\037ERROR\037: This setting is already enabled."; return}
          channel set $chan +talkz
          putquick "NOTICE $nick :Enabled Autoreply Thanks System for $chan"
          return 0
        }
    
        if {[lindex [split $arg] 1] == "off"} {
          if {![channel get $chan talkz]} {putquick "NOTICE $nick :\037ERROR\037: This setting is already disabled."; return}
          channel set $chan -talkz
          putquick "NOTICE $nick :Disabled Autoreply Thanks System for $chan"
          return 0
        }
      }
    }
    
    proc op:check {nick uhost hand chan mode {target ""}} {
      global botnick thankstext
      if {![channel get $chan talkz]} {return}
      if {[string match $botnick $target]} {
        set replyopmsg [lindex $thankstext [rand [llength $thankstext]]] 
        set replyopmsg [subst -nocommands $replyopmsg]
        puthelp "PRIVMSG $chan :$replyopmsg"
        return 0
      }
    }
    
    proc deop:check {nick uhost hand chan mode {target ""}} {
      global botnick complaintext
      if {![channel get $chan talkz]} {return}
      if {[string match $botnick $target]} {
        set replydeopmsg [lindex $complaintext [rand [llength $complaintext]]] 
        set replydeopmsg [subst -nocommands $replydeopmsg]
        puthelp "PRIVMSG $chan :$replydeopmsg"
        return 0
      }
    }
    
    proc voice:check {nick uhost hand chan mode {target ""}} {
      global botnick thankstext
      if {![channel get $chan talkz]} {return}
      if {[string match $botnick $target]} {
        set replyvoicemsg [lindex $thankstext [rand [llength $thankstext]]] 
        set replyvoicemsg [subst -nocommands $replyvoicemsg]
        puthelp "PRIVMSG $chan :$replyvoicemsg"
        return 0
      }
    }
    
    proc devoice:check {nick uhost hand chan mode {target ""}} {
      global botnick complaintext
      if {![channel get $chan talkz]} {return}
      if {[string match $botnick $target]} {
        set replydevoicemsg [lindex $complaintext [rand [llength $complaintext]]] 
        set replydevoicemsg [subst -nocommands $replydevoicemsg]
        puthelp "PRIVMSG $chan :$replydevoicemsg"
        return 0
      }
    }
    
    putlog ".:autoreply.tcl,v1.7:. Loaded! - istok @ IRCSpeed"

     

  2. # $Id: adduser-joinmodes.tcl,v1.6 04/03/2016 07:00:31am GMT +12 (NZST) IRCSpeed Exp $
    
    # ----- ADDING USERS ----- (Basic User adding)
    # Commands are:
    # !addowner nickname
    # !addmaster nickname
    # !addgop nickname
    # !addchanowner nickname
    # !addsop nickname
    # !delsop nickname
    # !addaop nickname
    # !delaop nickname
    # !addaov nickname
    # !delaov nickname
    
    # ----- JoinModes ----- (This enforces joinmodes @/+)
    # JoinModes Public Commands:
    # Enable:  !joinmodes on
    # Disable: !joinmodes off
    
    # JoinModes Message Command:
    # /msg botnick joinmodes #channel on|off
    
    # -----------EDIT BELOW------------
    
    # Set this to whatever trigger you like. (default: !)
    set addusertrig "!"
    
    # You don't need to edit the access flags. They are added like this because each command requires different access.
    # This is to ensure that user's can't add/del those with more access. If you wish to edit them, edit the proc directly.
    
    # ------EDIT COMPLETE!!------
    setudef flag joinmode
    
    proc addTrigger {} {
      global addusertrig
      return $addusertrig
    }
    
    bind join - * join:modes
    bind pub - ${addusertrig}addowner addowner:pub
    bind pub - ${addusertrig}addmaster addmaster:pub
    bind pub - ${addusertrig}addgop addgop:pub
    bind pub - ${addusertrig}addchanowner addcowner:pub
    bind pub - ${addusertrig}addsop addsop:pub
    bind pub - ${addusertrig}delsop delsop:pub
    bind pub - ${addusertrig}addaop addaop:pub
    bind pub - ${addusertrig}delaop delaop:pub
    bind pub - ${addusertrig}addaov addaov:pub
    bind pub - ${addusertrig}delaov delaov:pub
    bind pub - ${addusertrig}joinmodes jmode:pub
    bind msg - joinmodes jmode:msg
    
    proc addowner:pub {nick uhost hand chan arg} {
      if {![matchattr [nick2hand $nick] n]} {return}
      set owneradd [lindex [split $arg] 0]
      if {[lindex [split $arg] 0] == ""} {putquick "PRIVMSG $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [addTrigger]addowner nickname"; return}
      if {[validuser [nick2hand $owneradd]]} {putquick "PRIVMSG $chan :\037ERROR\037: $owneradd is already a valid user."; return}
      if {![onchan $owneradd $chan]} {putquick "PRIVMSG $chan :\037ERROR\037: $owneradd is not even on $chan ..."; return}
      set mask *!*@[lindex [split [getchanhost $owneradd $chan] @] 1]
      adduser $owneradd $mask
      chattr $owneradd +n
      putquick "NOTICE $nick :Added $owneradd to the Global Owner List."
      putquick "NOTICE $owneradd :$nick ($hand) has added you to the Global Owner List."
    }
    
    proc addmaster:pub {nick uhost hand chan arg} {
      if {![matchattr [nick2hand $nick] n]} {return}
      set masteradd [lindex [split $arg] 0]
      if {[lindex [split $arg] 0] == ""} {putquick "PRIVMSG $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [addTrigger]addmaster nickname"; return}
      if {[validuser [nick2hand $masteradd]]} {putquick "PRIVMSG $chan :\037ERROR\037: $masteradd is already a valid user."; return}
      if {![onchan $masteradd $chan]} {putquick "PRIVMSG $chan :\037ERROR\037: $masteradd is not even on $chan ..."; return}
      set mask *!*@[lindex [split [getchanhost $masteradd $chan] @] 1]
      adduser $masteradd $mask
      chattr $masteradd +m
      putquick "NOTICE $nick :Added $masteradd to the Global Master List."
      putquick "NOTICE $masteradd :$nick ($hand) has added you to the Global Master List."
    }
    
    proc addgop:pub {nick uhost hand chan arg} {
      if {![matchattr [nick2hand $nick] m]} {return}
      set gopadd [lindex [split $arg] 0]
      if {[lindex [split $arg] 0] == ""} {putquick "PRIVMSG $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [addTrigger]addgop nickname"; return}
      if {[validuser [nick2hand $gopadd]]} {putquick "PRIVMSG $chan :\037ERROR\037: $gopadd is already a valid user."; return}
      if {![onchan $gopadd $chan]} {putquick "PRIVMSG $chan :\037ERROR\037: $gopadd is not even on $chan ..."; return}
      set mask *!*@[lindex [split [getchanhost $gopadd $chan] @] 1]
      adduser $gopadd $mask
      chattr $gopadd +o
      putquick "NOTICE $nick :Added $gopadd to the Global OP List."
      putquick "NOTICE $gopadd :$nick ($hand) has added you to the Global OP List."
    }
    
    proc addcowner:pub {nick uhost hand chan arg} {
      if {![matchattr [nick2hand $nick] o]} {return}
      set cowneradd [lindex [split $arg] 0]
      if {[lindex [split $arg] 0] == ""} {putquick "PRIVMSG $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [addTrigger]addchanowner nickname"; return}
      if {[validuser [nick2hand $cowneradd]]} {putquick "PRIVMSG $chan :\037ERROR\037: $cowneradd is already a valid user."; return}
      if {![onchan $cowneradd $chan]} {putquick "PRIVMSG $chan :\037ERROR\037: $cowneradd is not even on $chan ..."; return}
      set mask *!*@[lindex [split [getchanhost $cowneradd $chan] @] 1]
      if {[onchan $cowneradd $chan] && ![isop $cowneradd $chan]} {putquick "MODE $chan +o $cowneradd"}
      adduser $cowneradd $mask
      chattr $cowneradd -|n $chan
      putquick "NOTICE $nick :Added $cowneradd to the Channel Owner List for $chan"
      putquick "NOTICE $cowneradd :$nick ($hand) has added you to the Channel Owner List for $chan"
    }
    
    proc addsop:pub {nick uhost hand chan arg} {
      if {![matchattr [nick2hand $nick] o|n $chan]} {return}
      set sopadd [lindex [split $arg] 0]
      if {[lindex [split $arg] 0] == ""} {putquick "PRIVMSG $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [addTrigger]addsop nickname"; return}
      if {[validuser [nick2hand $sopadd]]} {putquick "PRIVMSG $chan :\037ERROR\037: $sopadd is already a valid user."; return}
      if {![onchan $sopadd $chan]} {putquick "PRIVMSG $chan :\037ERROR\037: $sopadd is not even on $chan ..."; return}
      set mask *!*@[lindex [split [getchanhost $sopadd $chan] @] 1]
      if {[onchan $sopadd $chan] && ![isop $sopadd $chan]} {putquick "MODE $chan +o $sopadd"}
      adduser $sopadd $mask
      chattr $sopadd -|m $chan
      putquick "NOTICE $nick :Added $sopadd to the SOP List for $chan"
      putquick "NOTICE $sopadd :$nick ($hand) has added you to the SOP List for $chan"
    }
    
    proc delsop:pub {nick uhost hand chan arg} {
      if {![matchattr [nick2hand $nick] o|n $chan]} {return}
      set sopdel [lindex [split $arg] 0]
      if {[lindex [split $arg] 0] == ""} {putquick "PRIVMSG $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [addTrigger]delsop nickname"; return}
      if {![validuser [nick2hand $sopdel]]} {putquick "PRIVMSG $chan :\037ERROR\037: $sopdel is not a valid user."; return}
      if {[onchan $sopdel $chan] && [isop $sopdel $chan]} {putquick "MODE $chan -o $sopdel"}
      deluser $sopdel
      putquick "NOTICE $nick :Deleted $sopdel from the SOP List for $chan"
      putquick "NOTICE $sopdel :$nick ($hand) has deleted you from the SOP List for $chan"
    }
    
    proc addaop:pub {nick uhost hand chan arg} {
      if {![matchattr [nick2hand $nick] o|m $chan]} {return}
      set opadd [lindex [split $arg] 0]
      if {[lindex [split $arg] 0] == ""} {putquick "PRIVMSG $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [addTrigger]addaop nickname"; return}
      if {[validuser [nick2hand $opadd]]} {putquick "PRIVMSG $chan :\037ERROR\037: $opadd is already a valid user."; return}
      if {![onchan $opadd $chan]} {putquick "PRIVMSG $chan :\037ERROR\037: $opadd is not even on $chan ..."; return}
      set mask *!*@[lindex [split [getchanhost $opadd $chan] @] 1]
      if {[onchan $opadd $chan] && ![isop $opadd $chan]} {putquick "MODE $chan +o $opadd"}
      adduser $opadd $mask
      chattr $opadd -|o $chan
      putquick "NOTICE $nick :Added $opadd to the AOP List for $chan"
      putquick "NOTICE $opadd :$nick ($hand) has added you to the AOP List for $chan"
    }
    
    proc delaop:pub {nick uhost hand chan arg} {
      if {![matchattr [nick2hand $nick] o|m $chan]} {return}
      set opdel [lindex [split $arg] 0]
      if {[lindex [split $arg] 0] == ""} {putquick "PRIVMSG $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [addTrigger]delaop nickname"; return}
      if {![validuser [nick2hand $opdel]]} {putquick "PRIVMSG $chan :\037ERROR\037: $opdel is not a valid user."; return}
      if {[onchan $opdel $chan] && [isop $opdel $chan]} {putquick "MODE $chan -o $opdel"}
      deluser $opdel
      putquick "NOTICE $nick :Deleted $opdel from the AOP List for $chan"
      putquick "NOTICE $opdel :$nick ($hand) has deleted you from the AOP List for $chan"
    }
    
    proc addaov:pub {nick uhost hand chan arg} {
      if {![matchattr [nick2hand $nick] o|o $chan]} {return}
      set aovadd [lindex [split $arg] 0]
      if {[lindex [split $arg] 0] == ""} {putquick "PRIVMSG $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [addTrigger]addaov nickname"; return}
      if {[validuser [nick2hand $aovadd]]} {putquick "PRIVMSG $chan :\037ERROR\037: $aovadd is already a valid user."; return}
      set mask *!*@[lindex [split [getchanhost $aovadd $chan] @] 1]
      if {[onchan $aovadd $chan] && ![isvoice $aovadd $chan]} {putquick "MODE $chan +v $aovadd"}
      adduser $aovadd $mask
      chattr $aovadd -|v $chan
      putquick "NOTICE $nick :Added $aovadd to the AOV List for $chan"
      putquick "NOTICE $aovadd :$nick ($hand) has added you to the AOV List for $chan"
    }
    
    proc delaov:pub {nick uhost hand chan arg} {
      if {![matchattr [nick2hand $nick] o|o $chan]} {return}
      set aovdel [lindex [split $arg] 0]
      if {[lindex [split $arg] 0] == ""} {putquick "PRIVMSG $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [addTrigger]delaov nickname"; return}
      if {![validuser [nick2hand $aovdel]]} {putquick "PRIVMSG $chan :\037ERROR\037: $aovdel is not a valid user."; return}
      if {[onchan $aovdel $chan] && [isvoice $aovdel $chan]} {putquick "MODE $chan -v $aovdel"}
      deluser $aovdel
      putquick "NOTICE $nick :Deleted $aovdel from the AOV List for $chan"
      putquick "NOTICE $aovdel :$nick ($hand) has deleted you from the AOV List for $chan"
    }
    
    proc jmode:pub {nick uhost hand chan arg} {
      if {![matchattr [nick2hand $nick] o|n $chan]} {return}
      if {[lindex [split $arg] 0] == ""} {putquick "PRIVMSG $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [addTrigger]joinmodes on|off"; return}
    
      if {[lindex [split $arg] 0] == "on"} {
        if {[channel get $chan joinmode]} {putquick "PRIVMSG $chan :\037ERROR\037: This setting is already enabled."; return}
        channel set $chan +joinmode
        putquick "PRIVMSG $chan :Enabled Auto @/+ Modes for $chan"
        return 0
      }
    
      if {[lindex [split $arg] 0] == "off"} {
        if {![channel get $chan joinmode]} {putquick "PRIVMSG $chan :\037ERROR\037: This setting is already disabled."; return}
        channel set $chan -joinmode
        puthelp "PRIVMSG $chan :Disabled Auto @/+ Modes for $chan"
      }
    }
    
    proc jmode:msg {nick uhost hand arg} {
      global botnick
      set chan [strlwr [lindex $arg 0]]
      if {![matchattr [nick2hand $nick] o|n $chan]} {return}
      if {([lindex [split $arg] 0] == "") && ([string match "*#*" $arg])} {putquick "NOTICE $nick :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: /msg $botnick joinmodes #channel on|off"; return}
      if {([lindex [split $arg] 1] == "") && ([string match "*#*" $arg])} {putquick "NOTICE $nick :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: /msg $botnick joinmodes $chan on|off"; return}
    
      if {([lindex [split $arg] 1] == "on") && ([string match "*#*" $arg])} {
        if {[channel get $chan joinmode]} {putquick "NOTICE $nick :\037ERROR\037: This setting is already enabled."; return}
        channel set $chan +joinmode
        putquick "NOTICE $nick :Enabled Auto @/+ Modes for $chan"
        return 0
      }
    
      if {([lindex [split $arg] 1] == "off") && ([string match "*#*" $arg])} {
        if {![channel get $chan joinmode]} {putquick "NOTICE $nick :\037ERROR\037: This setting is already disabled."; return}
        channel set $chan -joinmode
        putquick "NOTICE $nick :Disabled Auto @/+ Modes for $chan"
        return 0
      }
    }
    
    proc join:modes {nick uhost hand chan} {
      global botnick
      if {[string tolower $nick] != [string tolower $botnick]} {
        if {[channel get $chan joinmode] && [botisop $chan]} {
    
          if {[matchattr [nick2hand $nick] |n $chan]} {
            putquick "MODE $chan +o $nick"
            return 0
          }
    
          if {[matchattr [nick2hand $nick] |m $chan]} {
            putquick "MODE $chan +o $nick"
            return 0
          }
    
          if {[matchattr [nick2hand $nick] |o $chan]} {
            putquick "MODE $chan +o $nick"
            return 0
          }
    
          if {[matchattr [nick2hand $nick] |v $chan]} {
            putquick "MODE $chan +v $nick"
            return 0
          }
        }
      }
    }
    
    putlog "AddUSER+JoinMODEs: Module LOADED! - istok @ IRCSpeed"

     

  3. # $Id: bans.tcl,v1.2 04/03/2016 05:41:42am GMT +12 (NZST) IRCSpeed Exp $
    
    # Commands:
    # !bans <=- shows channel ban list.
    # !globans <=- shows global ban list.
    # !addban *!*@banmask.etc reasons-for-ban <=- adds a channel ban.
    # !delban *!*@banmask.etc <=- removes a channel ban.
    # !gban *!*@banmask.etc reasons-for-ban <=- adds a global ban.
    # !delgban *!*@banmask.etc <=- removes a global ban.
    
    # MSGCMD: /msg botnick bans <=- shows global ban list.
    # MSGCMD: /msg botnick bans #channel <=- shows channel ban list.
    ###################################################################
    
    # Set global command trigger (default: !)
    set banstriga "!"
    
    # Set global access flags to use these commands (default: o)
    # This global access flag is able to use: !bans, !globans, !gban, !delgban, !addban, !delban
    set banglobflags o
    
    # Set channel access flags to use these commands (default: m)
    # This channel access flag is only able to use: !bans, !addban, !delban (like akick, for SOP)
    set banchanflags m
    
    proc getBanTriga {} {
      global banstriga
      return $banstriga
    }
    
    bind pub - ${banstriga}bans chan:bans
    proc chan:bans {nick uhost hand chan arg} {
      global banglobflags banchanflags
      if {[matchattr [nick2hand $nick] $banglobflags|$banchanflags $chan]} {
        putquick "PRIVMSG $chan :\002BANLIST\002 for $chan sent to $nick"
        putserv "NOTICE $nick :********* \002$chan BanList\002 **********"
    
        foreach botban [banlist $chan] {
          putserv "NOTICE $nick :\002BOTBAN\002: $botban"
        }
       putserv "NOTICE $nick :********** \002$chan BanList \037END\037\002 **********"
      }
    }
    
    bind pub - ${banstriga}globans glo:bans
    proc glo:bans {nick uhost hand chan arg} {
      global banglobflags
      if {[matchattr [nick2hand $nick] $banglobflags]} {
        putquick "PRIVMSG $chan :\002GLOBAL BANLIST\002 sent to $nick"
        putquick "NOTICE $nick :********* \002Global BanList\002 **********"
        foreach globan [banlist] {
          putquick "NOTICE $nick :\002GLOBAN\002: $globan"
        }
        putquick "NOTICE $nick :********** \002Global BanList \037END\037\002 **********"
      }
    }
    
    bind msg - bans ban:list
    proc ban:list {nick uhost hand arg} {
      global banglobflags banchanflags
      if {([lindex $arg 0] == "") && ([matchattr [nick2hand $nick] $banglobflags])} {
        putquick "NOTICE $nick :********** \002Global BanList\002 **********"
        foreach globban [banlist] {
          putquick "NOTICE $nick :\002GLOBBAN\002: $globban"
        }
        putquick "NOTICE $nick :********** \002Global BanList \037END\037\002 **********"
        } else {
        set chan [strlwr [lindex $arg 0]]
        if {([lindex [split $arg] 0] != "") && ([matchattr [nick2hand $nick] $banglobflags|$banchanflags $chan])} {
          putquick "NOTICE $nick :********** \002$chan BanList\002 **********"
          foreach chanban [banlist $chan] {
            putquick "NOTICE $nick :\002CHANBAN\002: $chanban"
          }
          putquick "NOTICE $nick :********** \002$chan BanList \037END\037\002 **********"
        }
      }
    }
    
    bind pub - ${banstriga}addban banint:pub
    proc banint:pub {nick uhost hand chan arg} {
      global banglobflags banchanflags
      if {![matchattr [nick2hand $nick] $banglobflags|$banchanflags $chan]} {return}
      set banmask [lindex [split $arg] 0]
      if {$banmask == ""} {putquick "NOTICE $nick \037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getBanTriga]addban *!*@banmask.etc reason-for-ban"; return}
      if {[isban $banmask $chan]} {putquick "PRIVMSG $chan :\037ERROR\037: Banmask already exists."; return}
      set banreason [join [lrange [split $arg] 1 end]]
      if {$banreason == ""} {putquick "NOTICE $nick \037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getBanTriga]addban *!*@banmask.etc reason-for-ban"; return}
      putquick "MODE $chan +b $banmask"
      newchanban "$chan" "$banmask" "$nick" "$banreason" 0
      putquick "NOTICE $nick :Successfully Added Ban: $banmask for $chan"
      return 0
    }
    
    bind pub - ${banstriga}delban unbanint:pub
    proc unbanint:pub {nick uhost hand chan arg} {
      global banglobflags banchanflags
      if {![matchattr [nick2hand $nick] $banglobflags|$banchanflags $chan]} {return}
      set unbanmask [lindex [split $arg] 0]
      if {$unbanmask == ""} {putquick "NOTICE $nick \037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getBanTriga]delban *!*@banmask.etc"; return}
      if {![isban $unbanmask $chan]} {putquick "PRIVMSG $chan :\037ERROR\037: Banmask not found."; return}
      killchanban $chan $unbanmask
      putquick "NOTICE $nick :Successfully Deleted Ban: $unbanmask for $chan"
      return 0
    }
    
    bind pub - ${banstriga}gban gban:pub
    proc gban:pub {nick uhost hand chan arg} {
      global banglobflags
      if {![matchattr [nick2hand $nick] $banglobflags]} {return}
      set banmask [lindex [split $arg] 0]
      if {$banmask == ""} {putquick "NOTICE $nick \037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getBanTriga]gban *!*@banmask.etc reason-for-ban"; return}
      if {[isban $banmask]} {putquick "NOTICE $nick :\037ERROR\037: Banmask already exists."; return}
      set banreason [join [lrange [split $arg] 1 end]]
      if {$banreason == ""} {putquick "NOTICE $nick \037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getBanTriga]gban *!*@banmask.etc reason-for-ban"; return}
      newban $banmask $nick $banreason 0
      putquick "NOTICE $nick :Successfully Added Global Ban: $banmask for: [channels]"
      return 0
    }
    
    bind pub - ${banstriga}delgban unbanglob:pub
    proc unbanglob:pub {nick uhost hand chan arg} {
      global banglobflags
      if {![matchattr [nick2hand $nick] $banglobflags]} {return}
      set unbanmask [lindex [split $arg] 0]
      if {$unbanmask == ""} {putquick "NOTICE $nick \037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getBanTriga]delgban *!*@banmask.etc"; return}
      if {![isban $unbanmask]} {putquick "NOTICE $nick :\037ERROR\037: Banmask not Found."; return}
      killban $unbanmask
      putquick "NOTICE $nick :Successfully Deleted Global Ban: $unbanmask for: [channels]"
      return 0
    }
    
    putlog "LOADED .:Bans.tcl:. - istok @ IRCSpeed"

     

    • Will work in any channel the BOT is on...
    • It's written ( and working ) on mIRC Ver. 6.35
    • Includes UserDB ( Tracks words, lines and characters ), !SEEN and AWAY system
    • Will notice user of other user being AWAY
      Meaning if anyone types a that's currently AWAY
      the bot will tell you how long since he/she went AFK and why / reason ( if a reason is given that is )
      NOTE: This doesn't work if your highlighting yourself... only works when other users "check"

     

    ;*** Downloaded from Hawkee - http://www.hawkee.com/snippet/8545/
    on *:TEXT:*:#:mEvent_Scan $strip($1-)
    on *:ACTiON:*:#:mEvent_Scan $strip($1-)
    on *:JOiN:#:mEvent_Scan $strip($1-)
    on *:PART:#:mEvent_Scan $strip($1-)
    on *:KICK:#:mEvent_Scan $strip($1-)
    on *:BAN:#:mEvent_Scan $strip($1-)
    on *:UNBAN:#:mEvent_Scan $strip($1-)
    on *:MODE:#:mEvent_Scan $strip($1-)
    on *:RAWMODE:#:mEvent_Scan $strip($1-)
    on *:TOPiC:#:mEvent_Scan $strip($1-)
    on *:QUiT:mEvent_Scan $strip($1-) | UserDB
    on *:NiCK:mEvent_Scan $newnick
    
    ;************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
    on *:START:UserDB
    on *:EXiT:UserDB
    on *:DiSCONNECT:UserDB
    ;************************************************************************************************************************
    alias UserDB {
      if ($event == Start) { if (!$hget(UserDB)) { hmake UserDB 1000 } | if ($isfile(SRU\Users\UserDB.hsh)) { hload UserDB SRU\Users\UserDB.hsh } }
      elseif (($event == Text) || ($event == Exit) || ($event == Quit) || ($event == Disconnect)) && ($hget(UserDB)) { hsave UserDB SRU\Users\UserDB.hsh | $iif($event == Text,msg # I've saved the User Database or updated if it... same same... but different) }
    }
    ;******************************************************************************************
    ;*** Output section *** Output section *** Output section *** Output section ***
    ;******************************************************************************************
    ;*** Nicknames - Used to color nick-names
    alias mNiCK { return $+(13,$1-,) }
    ;*******************************************************************************
    ;*** Channel - Used to color channels
    alias mCHAN { return $+(3,$1-,) } 
    ;*******************************************************************************
    ;*** Network - Used to color networks
    alias mNetC { return $+(14,$1-,) } 
    ;*******************************************************************************
    ;*** "NUMBERs" - Used to color number output
    alias mNUM { return $+(04,$1-,) }
    ;*******************************************************************************
    ;*** START "BRACKET" - Used to make a start "bracket" in a output line
    alias mSTART return 15ooO(
    ;*******************************************************************************
    ;*** END "BRACKET" - Used to end a start "bracket" in a output line
    alias mEND return 15)
    ;*******************************************************************************
    ;*** SPACER - User as a spacer inbetween random "stats"
    alias mSPACE return 14-5#14-
    ;******************************************************************************************
    
    ;******************************************************************************************
    ;***                 DO NOT TOUCH UNLESS YOU KNOW WHAT YOU ARE DOiNG                    ***
    ;******************************************************************************************
    ;*** Seen - Used to change output when doing !SEEN
    alias mReplaceSEEN return $+($replacex($1-,SCREW,screwing,fark,f*cking,RAPE,raping,MOLEST,molesting,SLAP,slaping,SWAFFEL,swaffeling,SEEN,looking for13,$+(iDLE,$chr(32)),doing a idle check on 13,$+(PiNG,$chr(32)),$+($mCMDS(!PiNG),'iNG) 13,$+(USER,$chr(32)),doing a $mCMDS(!User) check on 13,$+(IRCStats,$chr(32)),checking IRCStats for 13,$+(KiCK,$chr(32)),tossing 13,$+(UNBAN,$chr(32)),unbanning 13,$+(BAN,$chr(32)),banning 13,TEXT,writing,ACTiON,acting,JOiN,entering,PART,leaving,QUiT,quitting,TOPiC,changing topic to,RAWMODE,setting usermode,MODE,changing mode to),)
    ;*** Time - Used to change time output when doing !SEEN
    alias mReplaceCTiME return $replacex($duration($calc($ctime -$1)),WKS,weeks,WK,week,DAYS,days,DAY,day,MiNS,minutes,MiN,minute,SECS,seconds,SEC,second)
    ;*** StatsDB - Used to replace special characters in niks before attempting to save DB
    alias mReplaceStatsDB return $replace($remove($strip($1),[,],<,>,@,~,&,%,+),[,@,],~,|,-)
    ;*** Nick - Used to get usermodes on channel
    alias mReplaceNiCK return $+($iif($left($nick(#,$nick).pnick,1) != $left($nick,1),$remove($left($nick(#,$nick).pnick,1),$nick)),$nick)
    ;******************************************************************************************
    alias mEvent_Scan { 
      ;************************************************************************************************************************
      ;*** !Login - Used to set to current vHost
      if ($event == TEXT) && ($istok(!LOGiN,$1,32)) && ($hget(UserDB,$address($nick,2)) != $nick) { set -u1 %Event-MSG Changed nick from $v1 to $nick | var %nc = $addtok($ial($newnick).mark,$nick,32) | .ialmark $nick %nc | hadd -m UserDB $wildsite %nc | hsave UserDB SRU\Users\UserDB.hsh | .notice $nick [7UserDB] Updated - %Event-MSG }
      elseif ($event == TEXT) && ($istok(!LOGiN,$1,32)) { msg # Your host is already set to $nick - 4Note This isn't to change your nick... but to change your vHost to current nick }
      ;*** !NewNick - I forgot why I coded this... but will allow you to change you're vHost to other nick then currently using
      elseif ($event == TEXT) && ($istok(!NEWN !NEWNiCK,$1,32)) && ($hget(UserDB,$address($nick,2))) { set -u1 %Event-MSG Changed nick from $v1 to $2 | var %nc = $addtok($ial($newnick).mark,$2,32) | .ialmark $2 %nc | hadd -m UserDB $wildsite %nc | hsave UserDB SRU\Users\UserDB.hsh | .notice $nick [7UserDB] Updated - %Event-MSG }
      ;*******************************************************************************************************************************
      ;*** Check Status - Used to make sure it doesn't try to write when it's already writing
      if (%TEXT-NiCK) { return }
      ;*******************************************************************************************************************************
      ;*** Already added? - Checking to see if nick is already added (Using adress/vHost/$wildsite) (If it isn't found in the hash tables it will add for later use)
      elseif (!$hget(UserDB,$address($nick,2))) { var %Adress = $addtok($ial($newnick).mark,$nick,32) | .ialmark $nick %Adress | hadd -m UserDB $wildsite %Adress }
      ;*******************************************************************************************************************************
      ;*** Setting nick - Checking UserDB.hsh for the correct nick
      var %Event-NiCK $hget(UserDB,$address($nick,2)), %TEXT-NiCK $replacex(%Event-NiCK,[,@,],~,|,-)
      ;*******************************************************************************************************************************
      $iif($isdir($mircdir\SRU) == $false,mkDir $mircdir\SRU) | $iif($isdir($mircdir\SRU\Users) == $false,mkDir $mircdir\SRU\Users)
      ;*******************************************************************************************************************************
      ;*** #     #                                                                   ####### ####### #######    #    #       
      ;*** #     #  ####  ###### #####      ####  #####   ##   #####  ####              #    #     #    #      # #   #       
      ;*** #     # #      #      #    #    #        #    #  #    #   #                  #    #     #    #     #   #  #       
      ;*** #     #  ####  #####  #    #     ####    #   #    #   #    ####              #    #     #    #    #     # #       
      ;*** #     #      # #      #####          #   #   ######   #        #             #    #     #    #    ####### #       
      ;*** #     # #    # #      #   #     #    #   #   #    #   #   #    #             #    #     #    #    #     # #       
      ;***  #####   ####  ###### #    #     ####    #   #    #   #    ####              #    #######    #    #     # ####### 
      ;*******************************************************************************************************************************
      ;*** START DATE/DAY + TiME *****************************************************************************************************
      if (!$readini($+(SRU\Users\,%TEXT-NiCK,.ini),iNFO,STARTDATE)) { writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) iNFO STARTDATE $fulldate | writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) iNFO STARTTiME $ctime | writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) iNFO STARTDAY $day | writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY DAY $date | writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY TiME $ctime }
      ;*** DATE TODAY SECTiON ********************************************************************************************************
      elseif ($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TODAY,DAY) != $date) { remini $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY | writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY DAY $date | writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY TiME $ctime }
      ;*******************************************************************************************************************************
      if ($event == JOiN) && (%PART- [ $+ [ $+($network,$chan) ] ] == %TEXT-NiCK) { writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY Hops $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TODAY,Hops) +1) | $iif($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TODAY,PARTs) <= 1,remini $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY PARTs,writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY PARTs $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TODAY,PARTs) -1)) | writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TOTAL Hops $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TOTAL,Hops) +1) | $iif($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TOTAL,PARTs) <= 1,remini $+(SRU\Users\,%TEXT-NiCK,.ini) TOTAL PARTs,writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TOTAL PARTs $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TOTAL,PARTs) -1)) | goto END }
      elseif ($event != TEXT && $event != ACTiON) && ($readini($+(SRU\Users\,%TEXT-NiCK,.ini),iNFO,STARTDATE)) { $iif($event == PART,set -u7 %PART- [ $+ [ $+($network,$chan) ] ] %TEXT-NiCK) | writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY $+($upper($event),s) $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TODAY,$+($upper($event),s)) +1) | writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TOTAL $+($upper($event),s) $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TOTAL,$+($upper($event),s)) +1) | goto END }
      ;*******************************************************************************************************************************
      ;****** Total ( Words, Lines & Characters )
      writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TOTAL Words $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TOTAL,Words) +$0)
      writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TOTAL Lines $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TOTAL,Lines) +1)
      writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TOTAL Characters $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TOTAL,Characters) +$len($remove($1-,$chr(32))))
      ;*** Today ( Words, Lines & Characters )
      writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY Words $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TODAY,Words) +$0)
      writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY Lines $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TODAY,Lines) +1)
      writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY Characters $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TODAY,Characters) +$len($remove($1-,$chr(32))))
      ;*** END UserDB SECTiON ********************************************************************************************************
      ;*******************************************************************************************************************************
      ;*** AWAY SECTiON
      if ($remove($strip($1),!,@,.,+,-) == AWAY) || ($remove($strip($1),!,@,.,+,-) == AFK) || ($remove($strip($1),!,@,.,+,-) == BRB) || ($remove($strip($1),!,@,.,+,-) == BBL) || ($remove($strip($1),!,@,.,+,-) == TTYL) { $iif(!$readini(SRU\StatsDB.ini,$replace($nick,[,@,],~,|,-),AWAY),msg # $+(13,$nick,) is now marked as $+(3,AWAY,) $+(15ooO,$chr(40),) As in not here... $+(15,$chr(41),),$iif(!$2,return,.notice $nick Your $+(3,AWAY,) messages has been "updated" to -> $2-)) | writeini -n SRU\StatsDB.ini $replace($nick,[,@,],~,|,-) AWAY $ctime | writeini -n SRU\StatsDB.ini $replace($nick,[,@,],~,|,-) AWAYre $iif(!$2,N/A as in Not Available,$2-) }
      ;*** BACK / BaK
      elseif ($readini(SRU\StatsDB.ini,$replace($nick,[,@,],~,|,-),AWAY)) && ((BACK isin $strip($1-)) || (BAK isin $strip($1-)) || ($calc($ctime -$readini(SRU\StatsDB.ini,$replace($nick,[,@,],~,|,-),AWAY)) >= 600)) { set -u1 %T $v1 | $iif(!$timer($+(Back,$network,$chan)),msg # $+(13,$nick,) is now $+(03,$iif(BaK isin $1-,BAK,BACK),) $+(15ooO,$chr(40),) As in back at keyboard... $+(15,$chr(41),),.notice $nick Welcome back $+(13$nick,) you're no longer marked as $+(3AWAY)) | remini SRU\StatsDB.ini $replace($nick,[,@,],~,|,-) AWAY | remini SRU\StatsDB.ini $replace($nick,[,@,],~,|,-) AWAYre | $+(.timer,Back,$network,$chan) 1 5 noop }
      ;*** NOTE <NiCK> is AWAY
      elseif (!$timer($+(Away,$network,$chan))) && (($readini(SRU\StatsDB.ini,$mReplaceStatsDB($1),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($2),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($3),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($4),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($5),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($6),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($7),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($8),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($9),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($10),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($11),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($12),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($13),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($14),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($15),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($16),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($17),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($18),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($19),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($20),AWAYre))) { $+(.timer,Away,$network,$chan) 1 4 noop | set -u1 %RE $v1
        if ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($1),AWAY)) { set -u1 %X $1 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($2),AWAY)) { set -u1 %X $2 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($3),AWAY)) { set -u1 %X $3 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($4),AWAY)) { set -u1 %X $4 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($5),AWAY)) { set -u1 %X $5 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($6),AWAY)) { set -u1 %X $6 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($7),AWAY)) { set -u1 %X $7 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($8),AWAY)) { set -u1 %X $8 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($9),AWAY)) { set -u1 %X $9 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($10),AWAY)) { set -u1 %X $10 }
        elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($11),AWAY)) { set -u1 %X $11 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($12),AWAY)) { set -u1 %X $12 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($13),AWAY)) { set -u1 %X $13 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($14),AWAY)) { set -u1 %X $14 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($15),AWAY)) { set -u1 %X $15 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($16),AWAY)) { set -u1 %X $16 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($17),AWAY)) { set -u1 %X $17 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($18),AWAY)) { set -u1 %X $18 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($19),AWAY)) { set -u1 %X $19 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($20),AWAY)) { set -u1 %X $20 }
        $iif($strip(%X) != $nick,msg # [4NOTE] $+(13,$nick,) -> Currently $+(04,$replacex($duration($calc($ctime -$readini(SRU\StatsDB.ini,$mReplaceStatsDB(%X),AWAY))),WKS,weeks,WK,week,DAYS,days,DAY,day,MiNS,minutes,MiN,minute,SECS,seconds,SEC,second),)) since $+(13,$nick(#,$nick(#,%X)),) went $+(3AFK) $+(15ooO,$chr(40),) %RE $+(15,$chr(41),))
      }
      ;**********************************************************************************************************************************************************************************************************************************************
      ;*** !SEEN
      elseif ($1 == !SEEN) && ($readini($+(SRU\Users\,$replace($iif(!$2,$nick,$strip($2)),[,@,],~,|,-),.ini),SEEN,LAST) != $null) && (!$timer($+(SeenSearch,$network,$nick))) {   $+(.timer,SeenSearch,$network,$nick) 1 3 noop | set -u1 %2 $replace($iif(!$2,$nick,$strip($2)),[,@,],~,|,-)
        msg # Last seen $mReplaceSEEN($iif($readini($+(SRU\Users\,%2,.ini),SEEN,ACTiON) != $null,$v1 $+($readini($+(SRU\Users\,%2,.ini),SEEN,ViCTiM),),$iif($istok(%ChanHiDDEN,$readini($+(SRU\Users\,%2,.ini),SEEN,CHAN),32) && $readini($+(SRU\Users\,%2,.ini),SEEN,CHAN) == $chan,$readini($+(SRU\Users\,%2,.ini),SEEN,DOiNG),$iif(!$istok(%ChanHiDDEN,$readini($+(SRU\Users\,%2,.ini),SEEN,CHAN),32),$readini($+(SRU\Users\,%2,.ini),SEEN,DOiNG),$readini($+(SRU\Users\,%2,.ini),SEEN,LAST))))) $&
          $iif($readini($+(SRU\Users\,%2,.ini),SEEN,CHAN) && $readini($+(SRU\Users\,%2,.ini),SEEN,CHAN) != $chan,$iif($readini($+(SRU\Users\,%2,.ini),SEEN,LAST) != PART && $readini($+(SRU\Users\,%2,.ini),SEEN,LAST) != JOiN,inside) $mCHAN($readini($+(SRU\Users\,%2,.ini),SEEN,CHAN))) $iif($readini($+(SRU\Users\,%2,.ini),SEEN,WHERE) != $network,on $mNetC($v1)) $iif($readini($+(SRU\Users\,%2,.ini),SEEN,REASON),$v1) $&
          15ooO( $iif($readini($+(SRU\Users\,%2,.ini),SEEN,DATE) != $day $date(dd/mm/yyyy),$mDATE($v1) like) $mNUM($mReplaceCTiME($readini($+(SRU\Users\,%2,.ini),SEEN,TiME)) ago) $iif($readini($+(SRU\Users\,%2,.ini),LAST,$network) && $readini($+(SRU\Users\,%2,.ini),SEEN,WHERE) != $network,$mSPACE Last seen on $mNetC($network) like $mNUM($duration($calc($ctime -$readini($+(SRU\Users\,%2,.ini),LAST,$network))) ago)) 15)
      }
      ;***************************************************************************************************************************************************
      ;*** !IRCStats
      elseif ($1 == !U) || ($1 == !USER) || ($1 == !IRCSTATS) {
        ;*****************************************************************************
        ;*** SETTiNG NiCK
        set -u1 %2 $iif(!$2,$nick,$iif($strip($2) ison $chan,$nick(#,$nick(#,$v1)),$iif($readini($+(SRU\Users\,$strip($2),.ini),SEEN,LAST),$strip($2),$nick))))
        set -u1 %L $readini($+(SRU\Users\,$replace(%2,[,@,],~,|,-),.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Lines)
        ;***************************************************************************************************************************************************************************************************************************************
        if (!$readini($+(SRU\Users\,%2,.ini),SEEN,LAST)) { msg # Sorry $+($mNiCK($nick),...) I've got no date on $mNiCK(%2) $iif(%2 ison $chan,but he/she right here inside $mCHAN(#)) | goto END }
        ;***********************************************************************************************************************
        ;******* User Level / Class 
        ;*** 176400
        elseif ($strip(%L) >= $calc(420*420)) { set -u1 %Y 9Class 8Sage | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 04420 034209s }
        ;*** 105000
        elseif ($strip(%L) >= $calc(420*250)) { set -u1 %Y 9Class 8Ancient | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 04250 034209s }
        ;*** 42000
        elseif ($strip(%L) >= $calc(420*100)) { set -u1 %Y 9Class 8Idol | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 04100 034209s }
        ;*** 21000
        elseif ($strip(%L) >= $calc(420*50)) { set -u1 %Y 9Class 8Icon | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 0450 034209s }
        ;*** 12600
        elseif ($strip(%L) >= $calc(420*30)) { set -u1 %Y 9Class 8Elite | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 0430 034209s }
        ;*** 8400
        elseif ($strip(%L) >= $calc(420*20)) { set -u1 %Y 9Class 14Legend | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 0420 034209s }
        ;*** 6300
        elseif ($strip(%L) >= $calc(420*15)) { set -u1 %Y 9Class 15Veteran | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 0415 034209s }
        ;*** 5880
        elseif ($strip(%L) >= $calc(420*14)) { set -u1 %Y 9Class 14Meth Lab Manager | set -u1 %Y+ at least $+(04,$v2) 14lines 15aka 0414 034209s }
        ;*** 5460
        elseif ($strip(%L) >= $calc(420*13)) { set -u1 %Y 9Class 15Meth Lab Assistant | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 0413 034209s }
        ;*** 5040
        elseif ($strip(%L) >= $calc(420*12)) { set -u1 %Y 9Class 15Thug | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 0412 034209s }
        ;*** 4620
        elseif ($strip(%L) >= $calc(420*11)) { set -u1 %Y 9Class 15Saboteur | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 0411 034209s }
        ;*** 4200
        elseif ($strip(%L) >= $calc(420*10)) { set -u1 %Y 9Class 3Informant | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 0410 034209s }
        ;*** 3780
        elseif ($strip(%L) >= $calc(420*9)) { set -u1 %Y 9Class 3Gang Member | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 049 034209s }
        ;*** 3360
        elseif ($strip(%L) >= $calc(420*8)) { set -u1 %Y 9Class 14Gang Recruit | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 048 034209s }
        ;*** 2940
        elseif ($strip(%L) >= $calc(420*7)) { set -u1 %Y 9Class 15Thief | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 047 034209s }
        ;*** 2520
        elseif ($strip(%L) >= $calc(420*6)) { set -u1 %Y 9Class 15Shoplifter | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 046 034209s }
        ;*** 2100
        elseif ($strip(%L) >= $calc(420*5)) { set -u1 %Y 9Class 15Mugger | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 045 034209s }
        ;*** 1680
        elseif ($strip(%L) >= $calc(420*4)) { set -u1 %Y 9Class 15Purse Snatcher | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 044 034209s }
        ;*** 1260
        elseif ($strip(%L) >= $calc(420*3)) { set -u1 %Y 9Class 15Pickpocket | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 043 034209s }
        ;*** 840
        elseif ($strip(%L) >= $calc(420*2)) { set -u1 %Y 9Class 15Civilian 15(8User15) | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 042 034209s }
        ;*** 420
        elseif ($strip(%L) >= 420) { set -u1 %Y 9Class 15Civilian 15(8New User15) | set -u1 %Y+ at least $+(04,$v2,) 14lines }
        ;*** Lower then 420
        elseif ($strip(%L) < 420) { set -u1 %Y 9Class 14Scammer 15(8New User15) | set -u1 %Y+ less then $+(04,$v2,) 14lines }
        ;*****************************************************************************************************************************************************
        set -u1 %X $iif(!$2,$nick,$iif($strip($2) ison $chan,$nick(#,$nick(#,$v1)),$iif($readini($+(SRU\Users\,$strip($2),.ini),SEEN,LAST),$strip($2),$nick))))
        $iif(%Y+,set %Y+ $+(15,$chr(40),14Awarded to users with $v1,15,$chr(41))) 
        set -u1 %I $readini($+(SRU\Users\,%2,.ini),iNFO,iAM)
        set -u1 %Z $+(9,Last seen $iif($readini($+(SRU\Users\,%2,.ini),SEEN,CHAN) && $readini($+(SRU\Users\,%2,.ini),SEEN,CHAN) != $chan,inside $mCHAN($v1)) $iif($readini($+(SRU\Users\,%2,.ini),SEEN,WHERE) != $network,on $mNetC($v1)),) $&
          $iif($readini($+(SRU\Users\,%2,.ini),SEEN,DATE) != $day $date(dd/mm/yyyy),like) $mNUM($mReplaceCTiME($readini($+(SRU\Users\,%2,.ini),SEEN,TiME)) ago) $iif($readini($+(SRU\Users\,%2,.ini),SEEN,DATE) != $day $date(dd/mm/yyyy),$mSPACE $+($replace($v1,day,day14,/,15/14),))) $&
          $iif($readini($+(SRU\Users\,%2,.ini),LAST,$network) && $readini($+(SRU\Users\,%2,.ini),SEEN,WHERE) != $network,$mSPACE Last seen on $mNetC($network) like $mNUM($duration($calc($ctime -$readini($+(SRU\Users\,%2,.ini),LAST,$network))) ago)) 
        ;**********************************************************************************************************************************************************************************************************************************************
        msg # 9[ $+(03,%X) $+(9],$iif(%I,:[ $+(09,$v1) 9]),:-:[) %Y $replace($remove(%Y+,$chr(41)),$chr(40),$+($mSPACE,$chr(32))) $+(9],$iif(%Z,:[ $+(09,$v1) 9]),)
        $iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Words),msg # 9Has written $mNUM($v1) 9words $&
          $+($chr(40),9Avg. $mNUM($round($calc($iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Words) > $readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Characters),$v1 / $v2,$v2 / $v1)),2)),$chr(41)) $&
          9in $mNUM($iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Lines),$v1,0)) 9lines $&
          $+($chr(40),9Avg. $mNUM($round($calc($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Words) / $readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Lines)),2)),$chr(41)) $&
          9with $mNUM($iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Characters),$v1,0)) 9characters... $&
          $iif($strip($3) == TOTAL,[14STATS] $+($iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Joins),$mNUM($v1) $+(9join,$iif($v1 >= 2,s))) $&
          $iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Parts),$mNUM($v1) $+(9part,$iif($v1 >= 2,s))) $&
          $iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Hops),$mNUM($v1) $+(9hop,$iif($v1 >= 2,s))) $&
          $iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Kicks),$mNUM($v1) 9kicked) $&
          $iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Banns),$mNUM($v1) 9banned) $&
          $iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),UN-Banns),$mNUM($v1) 9un-banned) $&
          $iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Modes),$mNUM($v1) $+(9mode,$iif($v1 >= 2,s))) $&
          $iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),uModes),$mNUM($v1) $+(9usermode,$iif($v1 >= 2,s))) $&
          $iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Topics),$mNUM($v1) $+(9topic,$iif($v1 >= 2,s))) $&
          $iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Quits),$mNUM($v1) $+(9quit,$iif($v1 >= 2,s))) $&
          $iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Actions),and $mNUM($v1) $+(9action,$iif($v1 >= 2,s))),)))
        ;**********************************************************************************************************************************************************************************************************************************************
      }
      ;**********************************************************************************************************************************************************************************************************************************************
      :END
      ;******
      unset %Y %Y+ %I %Z %X %L
      ;***********************
      ;*** LAST SECTiON
      writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) LAST SEEN $ctime
      writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) LAST $upper($event) $ctime
      writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) LAST $network $ctime
      $iif($chan != $null,writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) LAST $+($network,$chan) $ctime)
      ;*** SEEN SECTiON
      .remini $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN
      writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN LAST $upper($event)
      writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN TiME $ctime
      writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN DATE $day $date(dd/mm/yyyy)
      writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN WHERE $network
      $iif($chan != $null,writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN CHAN $chan)
      $iif($chan != $null,writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN NiCK $mReplaceNiCK($nick))
      ;*************************************************************************************************
      if ($event == PART) || ($event == QUiT) writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN REASON $iif($event == QUiT,$iif($3,$strip($3-),QUiT),$iif($event == PART,$iif($1,$strip($1-),N/A)))
      ;*************************************************************************************************
      writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN DOiNG $upper($event) $iif($event == QUiT,$iif($3,$strip($3-),QUIT),$iif($event == PART,$iif($1,$strip($1-),N/A),$iif($event == BAN,$bnick,$iif($event == UNBAN,$bnick,$iif($event == KiCK,$knick $strip($1-),$strip($1-))))))
      ;******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
      if ($event == ACTiON) && ((rape isin $strip($1)) || (molest isin $strip($1)) || (fark isin $strip($1)) || (SCREW isin $strip($1)) || (slap isin $strip($1)) || (thank isin $strip($1)) || (swaffel isin $strip($1))) {
        writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN ACTiON $v1
        $iif($remove($strip($2),:,>,<,!,?) ison $chan,writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN ViCTiM $nick(#,$nick(#,$v1)))
      }
      ;************************************************************************************************************
      elseif ($event == TEXT) && ((!SEEN isin $strip($1)) || (!iDLE isin $strip($1)) || (!PiNG isin $strip($1)) || (!USER isin $strip($1)) || (!U isin $strip($1)) || (!IRCStats isin $strip($1))) {
        writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN ACTiON $iif($1 != !U,$remove($v1,!),USER)
        writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN ViCTiM $iif($remove($strip($2),:,>,<,!,?) ison $chan,$nick(#,$nick(#,$v1)),$iif(!$2,$nick,$remove($strip($2),:,>,<,!,?)))
      }
      ;***********************************************************************************************************************************************************
      unset %TEXT-NiCK %Event-NiCK
    }

     

  4. Blackjack Race is a channel based multiplayer game, supporting up to your standard 7 players.

    I saw a few versions of Blackjack on this site, but none of them were scripted well, whether it be the style of code, the game pace or the logic within the code to match the game. So here you go 🙂

    Features include:

    • Simultaneous games within multiple channels at the same time
    • A "first to" style, meaning rather than betting, you're trying to accumulate a certain amount of coins to win
    • Derived from the real casino game, but adapted to suit IRC
    • A real shoe, with shuffling points when shoe density falls below a threshold
    • Accurate dealer simulation, standing with hard 17
    • Strategy play options: !hit !stand !double !split !surrender
    • Resplit as many times as you require! 10 seconds are added to the timer for each "layer" of hands all players go through
    • The Edge - An optional lower boundary which kicks players from the game when overstepped
    • AI opponents, with an intelligence range from 1 to 10
    • Automatic AI participation if only 1 player joins
    • Easily configure options and house rules within the script
    • No messy global variables
    • Possibility to save statistics via external files

     

    To start a game, type !blackjack
    To join a game, type !join
    To start a game with AI opponents ready to join, type !blackjack N, where N is a number from 1 to 7
    To start a game with specific AI opponents, for example Jess and Kyle, type !blackjack Jess Kyle
    To leave a game type !replace. This will replace you with an AI opponent
    To view a list of AI opponents and their intelligence level, type !ai
    To forcefully stop a game, type !blackjack stop OR !stop (Operators only)
    To abort the games termination, type !abort
    To view a list of ALL commands, type !commands

     

    ;########################################################
    ;########################################################
    ; SETTINGS (for YOU.... yes YOU!!!)
    ;########################################################
    ;########################################################
    
    ;# THE DEALER HAS AN EDGE. If you win as much as you lose, all player balances will gradually decrease making the 'finish' impossible to reach.
    ;# to compensate, you can award points for draws, and reward more money for a win than you take away for a loss. The same applies for doubles.
    ;# for faster games: 200 40 20 30 0 -10 5 10 -3
    ;# more realistic game values: 150 40 20 30 -10 -25 0 0 -5
    
    alias -l finish return 150
    alias -l winDouble return 40
    alias -l winSingle return 20
    alias -l winBlackjack return 30
    alias -l loseSingle return -10
    alias -l loseDouble return -25
    alias -l drawSingle return 0
    alias -l drawDouble return 0
    alias -l surrender return -5
    
    ;# theEdge - Set to 0 to disable. Kicks players from the game after falling below -N
    
    alias -l theEdge return -100
    
    ;# Bonus payouts. N card tricks represent an auto-payout if a player's hand consists of N cards. set to 0 to disable, otherwise set to the amount which should be paid out.
    
    alias -l var5CardTrickPayout return 5
    alias -l var6CardTrickPayout return 10
    alias -l var7CardTrickPayout return 15
    alias -l var5Card21Payout return 20
    alias -l var6Card21Payout return 40
    alias -l var7Card21Payout return 100
    
    ;# House rules. 'decks' can be from 2-8. The other lines respresent rules which can be used in the game. To "activate" a rule, change the 0 to a 1.
    
    alias -l decks return 2
    alias -l dealerHitsOnSoft17 return 0
    alias -l doubleWith3orMoreCards return 0
    alias -l noResplitWithAces return 0
    alias -l splitAcesOneCardOnly return 0
    
    ;# Colors. 3 are used, each represented below. Use 2 digits, from 00-15
    
    alias -l color1 return 07
    alias -l color2 return 03
    alias -l color3 return 06
    
    ;# AI opponents. Just seperate the names by spaces, if you want to add more.
    ;# the intelligence levels correlate to the names, so Jess matches 6 and Kyle matches the last 1.
    
    alias -l ai return Jess Trump DeathKnight AIMaster Jerry Lacey Jonorama Degausser NotTheSun Kyle
    alias -l aiIntel return 6 9 8 10 3 5 4 7 2 1
    
    ;# 'statEnable' signifies whether the statistics will be recorded. 1 represents on, and 0 off
    ;# 'statDirectory' is your path to stats. there should be no slashes at the beginning or end of the path. use \ if you want to go deeper into folders
    ;# the other two aliases represent the minimum needed hands/games for a user to be displayed in the top5 lists
    
    alias -l statEnable return 1
    alias -l statDirectory return stats\blackjack
    alias -l statMinHands return 10
    alias -l statMinGames return 2
    
    ;########################################################
    ;########################################################
    ; TEXT EVENTS
    ;########################################################
    ;########################################################
    
    on *:TEXT:*:#:{
      if ($hget($g($chan,1))) {
        if ($hget($g($chan,1), $nick)) && ($hget($g($chan,1), $nick) != check) && (!$isAI($chan, $nick)) {
          if ($timer($+(BlackJack,$chan,DrawTimer))) {
            if ($1 == !hit) || ($1 == !card) drawCardAction $chan $nick
            elseif ($1 == !double) drawCardAction $chan $nick -d
            elseif ($1 == !stand) standAction $chan $nick
            elseif ($1 == !split) splitAction $chan $nick
            elseif ($1 == !surrender) surrenderAction $chan $nick
          }
          if ($1 == !replace) || ($1 == !drop) replaceAction $chan $nick
        }
        elseif ($istok(!join.join,$1,46)) && ($timer($+(BlackJack,$chan,JoinTimer))) addPlayer $chan $nick
        if ($1-2 == !blackjack stop) || ($1 == !stop) triggerBlackjackStop $chan -m $nick
        elseif ($1 == !abort) && ($hget($s($chan), stop)) triggerAbort $1-
        elseif ($1 == !repair) && ($nick isop $chan) triggerRepair $chan
      }
      elseif ($1 == !blackjack) triggerBlackjack $1-
      if ($1 == !stat) triggerStats stat $1-
      elseif ($1 == !coins) triggerStats coins $1-
      elseif ($1 == !commands) triggerCommands $1-
      elseif ($1 == !top5) triggerTop5 $1-
      elseif ($1 == !compare) triggerCompare $1-
      elseif ($1 == !ai) .notice $nick List of computer opponents: $listAI
    }
    
    ;########################################################
    ;########################################################
    ; LITTLE ALIASES
    ;########################################################
    ;########################################################
    
    alias -l suits return ♣♠♥♦
    alias -l cardify return $replace($1-,10,E,11,J,12,Q,13,K,1,A,E,10)
    alias -l bracks return $+($chr(40),$1-,$chr(41))
    alias -l cb1 return $+(,$color1,,$1-,)
    alias -l cb2 return $+(,$color2,,$1-,)
    alias -l cb3 return $+(,$color3,,$1-,)
    alias -l c1 return $+(,$color1,$1-,,)
    alias -l c2 return $+(,$color2,$1-,,)
    alias -l c3 return $+(,$color3,$1-,,)
    alias -l f { verif | return $+(",$mircdir,$statDirectory,\,$1,.ini,") }
    alias -l l { verif | return $+(",$mircdir,$statDirectory,\,$1,.txt,") }
    alias -l getStat return $iif($readini($1,$2,$3),$ifmatch,0)
    alias -l fs filter -ffctue 1 32 $1- $1-
    alias -l top5 return cph.wr.cpg.gr.h2h
    alias -l g return $+(bj_game,_,$1,_,$2)
    alias -l a return $+(bj_action,_,$1,_,$2)
    alias -l d return $+(bj_deck,_,$1)
    alias -l w return $+(bj_score,_,$1)
    alias -l s return $+(bj_settings,_,$1)
    
    alias -l hfreedom {
      if ($hget($g($1,1))) hfree $g($1,1)
      if ($hget($a($1,1))) hfree $a($1,1)
      if ($hget($d($1))) hfree $d($1)
      if ($hget($w($1))) hfree $w($1)
      if ($hget($s($1))) hfree $s($1)
      hfreedomMirror $1
    }
    
    alias -l hfreedomMirror {
      var %x = 2
      while ($hget($g($1,%x))) {
        hfree $hget($g($1,%x))
        hfree $hget($a($1,%x))
        inc %x
      }
    }
    
    alias -l verif {
      if (!isdir($+(",$mircdir,$statDirectory,\,"))) {
        var %x = 1
        while (%x <= $numtok($statDirectory,92)) {
          if (!isdir($+(",$mircdir,$gettok($statDirectory,$+(1-,%x),92),\,"))) .mkdir $+(",$mircdir,$gettok($statDirectory,$+(1-,%x),92),\,")
          inc %x
        }
      }
    }
    
    ;########################################################
    ;########################################################
    ; GAME TRIGGERS
    ;########################################################
    ;########################################################
    
    alias triggerBlackjack {
      if (!$2) blackjackStart $chan $nick
      elseif ($istok(1.2.3.4.5.6.7,$2,46)) blackjackStart $chan $nick $2
      elseif ($filterAI($2-)) blackjackStart $chan $nick $ifmatch
      else {
        .notice $nick Invalid parameter. To start a game with AI opponents ready to join, type !blackjack N. N can be a number from 1-7
        .notice $nick You can also specify certain AI opponents you want in the game, for example: !blackjack AIMaster Degausser Trump
      }
    }
    
    alias triggerBlackjackStop {
      if ($3 !isop $1) .notice $3 You must be an operator to stop a game!
      else {
        if ($cardsRemaining($1)) {
          if (!$hget($s($1), stop)) stopAction $1 $3
          else .notice $3 The game will end after the current round!
        }
        elseif ($timer($+(BlackJack,$1,JoinTimer))) {
          $+(.timerBlackJack,$chan,*) off
          if ($2 == -m) msg $chan $cb3(Blackjack Race) has been stopped by $c3($3)
          hfreedom $1
        }
        else .notice $3 You can't perform this action now!
      }
    }
    
    alias -l triggerAbort {
      if ($timer($+(BlackJack,$chan,DrawTimer))) && ($nick isop $chan) abortAction $chan $nick
      elseif ($nick !isop $chan) .notice $nick You must be an operator to abort the games termination!
      else .notice $nick You can't perform that action now
    }
    
    alias -l triggerStats {
      if (!$3) .notice $nick Invalid parameters. Specify a name. The -a flag can be used to specify an AI character like: $+(!,$1) -a Degausser
      elseif (((!$4) && (!$userStats($3))) || (($4) && (!$userStats($4)))) || (($1 == coins) && ((!$userStats($4).user) && (!$userStats($3).user))) .notice $nick Sorry, I haven't heard that name before
      else {
        var %s
        if (!$4) %s = $chan -u $3
        elseif ($3 == -a) && ($userStats($4).ai) && ($1 != coins) %s = $chan -a $4
        else %s = $chan -u $4
        if ($1 == stat) displayStats %s
        elseif ($1 == coins) displayCoins %s
      }
    }
    
    alias -l triggerCommands {
      if ($istok(!ai.ai,$2,46)) .notice $nick This will send you a notice with a list of AI opponents you're able to play against
      elseif ($istok(!stat.stat,$2,46)) .notice $nick These will send a message with user statistics for the specified name. You can specify the -a flag to define AI opponents, such as: !stat -a Degausser
      elseif ($istok(!coins.coins,$2,46)) .notice $nick These will send a message with total user coins. Define a user (not AI) by simply specifying a username.
      elseif ($istok(!commands.commands,$2,46)) .notice $nick This will notice you a list of commands.... silly!
      elseif ($istok(!compare.compare,$2,46)) {
        .notice $nick Compare two players based on their stats in comparison to all other players. You can specify two names, and optionally a -a or -u before the names to specify AI or user
        .notice $nick For example, !compare Anne -a Degausser. Example 2: !compare -a Kyle -u Sarah
      }
      elseif ($istok(!blackjack.blackjack,$2,46)) {
        .notice $nick This command will start a game. You can specify the number of AI opponents ready to join by typing !blackjack N, where N is a number from 1-7
        .notice $nick You can also specify specific players by using their names (type !ai for a list) like so: !blackjack Degausser NotTheSun
        .notice $nick If a game is active, channel operators can end the game by typing: !blackjack stop
      }
      elseif ($istok(!replace.replace,$2,46)) .notice $nick Specifically an in-game command to be used if you don't want to play anymore. The game will be counted as a loss
      elseif ($istok(!top5.top5,$2,46)) {
        .notice $nick Displays lists of top 5 players. You can specify a -a or -u flag to view distinct AI or user lists. You can also specify the type of list from: $replace($top5,$chr(46),$chr(32))
        .notice $nick Example 1: !top5 -u wr :: Example 2: !top5 cph
      }
      elseif ($istok(!abort.abort,$2,46)) {
        .notice $nick Allows you to abort the !blackjack stop operation, before a hand finishes
      }
      elseif ($istok(!stop.stop,$2,46)) {
        .notice $nick Stops the entire round. Does not apply game based statistics
      }
      elseif ($istok(!repair.repair,$2,46)) {
        .notice $nick Repairs the game if you're having trouble starting a new game
      }
      else {
        .notice $nick Helpful commands - IN GAME: !hit !stand !double !split !surrender !replace !stop !abort !repair - OUTSIDE: !blackjack !commands !ai !stat !coins !top5 !compare
        .notice $nick Type !commands command for more information on some commands, for example: !commands ai
      }
    }
    
    alias -l triggerTop5 {
      var %t = $gettok($top5,1,46)
      if (!$3) {
        if ($istok(-a.-u,$2,46)) displayTop5 $chan $2 %t
        else displayTop5 $chan -n $iif($istok($top5,$2,46),$2,%t)
      }
      elseif ($left($2,1) == $chr(45) && $len($2) == 2) displayTop5 $chan $iif($istok(-a.-u,$2,46),$2,-n) $iif($istok($top5,$3,46),$3,%t)
      elseif ($2) displayTop5 $chan -n $iif($istok($top5,$2,46),$2,%t)
      else displayTop5 $chan -n %t
    }
    
    alias -l triggerCompare {
      if ($0 == 3) {
        if ($userStats($2)) && ($userStats($3)) displayCompare -u $2 -u $3 $chan
        else .notice $nick One of more of the specified users could not be found
      }
      elseif ($0 == 5) {
        if ($userStats($3)) && ($userStats($5)) displayCompare $iif($2 == -a,-a,-u) $3 $iif($4 == -a,-a,-u) $5 $chan
        else .notice $nick One of more of the specified users could not be found
      }
      elseif ($0 < 3) .notice $nick You have to specify two users to compare them. Type !compare player1 player2
      elseif ($0 > 5) .notice $nick You've specified to many parameters! To specify users or AI, type: !compare -u user -a AIname
      else {
        if ($userStats($3)) {
          if ($userStats($4)) displayCompare $iif($2 == -a,-a,-u) $3 -u $4 $chan
          elseif ($userStats($2)) displayCompare -u $2 $iif($4` == -a,-a,-u) $3 $chan
        }
        elseif ($userStats($2)) && ($userStats($4)) displayCompare -u $2 $iif($3 == -a,-a,-u) $4 $chan
        else .notice $nick One or more of the specified users are not recognized
      }
    }
    
    alias -l triggerRepair {
      if (!$timerCheck($1)) {
        msg $1 $cb3(Blackjack Race) was found in a $c2(broken state) $+ , and has been $c3(repaired)
        hfreedom $1
      }
    }
    
    alias -l timerCheck {
      if ($timer($+(blackjack,$1,DrawTimer)).secs isnum) return $true
      if ($timer($+(blackjack,$1,JoinTimer)).secs isnum) return $true
      if ($timer($+(blackjack,$1,AutoTimer)).secs isnum) return $true
      if ($timer($+(blackjack,$1,RepeatGame)).secs isnum) return $true
      if ($timer($+(blackjack,$1,NextRound)).secs isnum) return $true
      if ($timer($+(blackjack,$1,AnnounceWinner)).secs isnum) return $true
      if ($timer($+(blackjack,$1,EndGame)).secs isnum) return $true
      return $false
    }
    
    ;########################################################
    ;########################################################
    ; ACTIONS
    ;########################################################
    ;########################################################
    
    alias -l drawCardAction {
      if ($numerifyTotal($cardTotal($1,-u,$2).hard) < 21) && (!$istok(double.stand, $hget($a($1,1), $2), 46)) {
        var %d = $iif(d isin $3,$true,$false)
        if ((%d) && ($numtok($hget($g($1,1), $2), 32) > 2)) && (!$doubleWith3orMoreCards) .notice $nick You can only double with the first two cards!
        else {
          var %card = $drawCard($1), %z
          hadd $g($1,1) $2 $hget($g($1,1), $2) %card
          %z = $numerifyTotal($cardTotal($1,-u,$2).hard)
          if (%z > 20) && (!%d) hadd $a($1,1) $2 stand
          else hadd $a($1,1) $2 $iif(%d,double,hit)
          msg $1 $c2($2) $iif(%d,doubled,hit) and drew: $cardflair(%card) :: Current hand: $cardflair($hget($g($1,1), $2)) $bracks($cardTotal($1,-u,$2))
          if (%z == 21) && ($($+($chr(36),var,$numtok($hget($g($1,1),$2),32),Card21Payout),2)) {
            hinc $w($1) $2 $ifmatch
            msg $1 $c1($2) has hit a $cb3($numtok($hget($g($1,1),$2),32) Card 21) and is rewarded $c2($ifmatch coins)
          }
          elseif (%z < 21) && ($($+($chr(36),var,$numtok($hget($g($1,1),$2),32),CardTrickPayout),2)) {
            hinc $w($1) $2 $ifmatch
            msg $1 $c1($2) has hit a $cb3($numtok($hget($g($1,1),$2),32) Card Trick) and is rewarded $c2($ifmatch coins)
          }
          if ((%d) || (%z > 20)) {
            hinc $s($1) completed 1
            if ($splitHand($1,$2)) createSplits $1 $2 $ifmatch
            elseif ($actionsComplete($1)) checkWinner $1 -f
          }
        }
      }
      else .notice $2 You can't draw anymore cards!
    }
    
    alias -l standAction {
      if ($numerifyTotal($cardTotal($1,-u,$2).hard) < 21) && (!$istok(double.stand, $hget($a($1,1), $2), 46)) {
        hadd $a($1,1) $2 stand
        hinc $s($1) completed 1
        msg $1 $c2($2) stands with the hand: $cardflair($hget($g($1,1), $2)) $bracks($cardTotal($1,-u,$2))
        if ($splitHand($1,$2)) createSplits $1 $2 $ifmatch
        elseif ($actionsComplete($1)) checkWinner $1 -f
      }
      else .notice $2 You can't perform this action!
    }
    
    alias -l splitAction {
      var %hand = $hget($g($1,1),$2)
      if ($cardPair(%hand)) && (!$istok(double.stand,$hget($a($1,1),$2),46)) {
        if ($noResplitWithAces) && ($gettok($gettok(%hand,1,32),2,95) == A) && ($hget($g($1,2),$2)) .notice $2 You can't split Aces more than once!
        else {
          msg $1 $c2($2) splits the hand: $cardflair($hget($g($1,1),$2)) $bracks($cardTotal($1,-u,$2))
          hadd $newSplitTable($1,$2) $2 $gettok($hget($g($1,1),$2),2,32)
          hadd $g($1,1) $2 $gettok($hget($g($1,1), $2),1,32)
          hinc $s($1) actions 1
          createSplits $1 $2
        }
      }
      else .notice $2 You can't perform this action!
    }
    
    alias -l surrenderAction {
      if ($numtok($hget($g($1,1), $2), 32) == 2) && ($numerifyTotal($cardTotal($1,-u,$2).hard) < 21) && (!$hget($m($1,1),$2)) && (!$istok(double.stand, $hget($a($1,1), $2), 46)) {
        msg $1 $c2($2) surrenders their hand: $cardflair($hget($g($1,1), $2)) $bracks($cardTotal($1,-u,$2)) and $c1($iif($surrender > 0,wins,loses) $abs($surrender) $iif($abs($surrender) == 1,coin,coins))
        hdel $a($1,1) $2
        hadd $g($1,1) $2 check
        hinc $w($1) $2 $surrender
        hinc $s($1) completed 1
        processHandStats $1 $2 total 1
        processHandStats $1 $2 lose 1
        processHandStats $1 $2 coins $surrender
        if ($actionsComplete($1)) checkWinner $1 -f
      }
      else .notice $2 You can't perform this action!
    }
    
    alias -l replaceAction {
      if (!$istok($hget($s($1),replace),$nick,32)) {
        hadd $s($1) replace $hget($s($1), replace) $2
        msg $1 $cb3($2) $c3(will be replaced after the next round!)
      }
    }
    
    alias -l stopAction {
      hadd $s($1) stop $2
      msg $1 $cb3(Blackjack Race) $c3(will be stopped after the next round!)
    }
    
    alias -l abortAction {
      if ($hget($s($1),stop)) hdel $s($1) stop
      msg $1 $cb3(Blackjack Race) $c3(will no longer be stopped after this round!)
    }
    
    alias -l actionsComplete {
      if ($hget($s($1), completed) == $hget($s($1), actions)) return $true
      return $false
    }
    
    ;########################################################
    ;########################################################
    ; SPLIT TABLES
    ;########################################################
    ;########################################################
    
    alias -l newSplitTable {
      var %x = 2
      while (%x) {
        if (!$hget($g($1, %x))) {
          hmake $g($1, %x) 1
          hmake $a($1, %x) 1
          $+(.timerBlackJack,$1,DrawTimer) -o 1 $calc($timer($+(BlackJack,$1,DrawTimer)).secs + 10) checkWinner $1
        }
        if (!$hget($g($1, %x), $2)) return $g($1,%x)
        inc %x
      }
    }
    
    alias -l splitHand {
      var %x = 2
      while ($hget($g($1,%x),$2)) {
        if ($numtok($ifmatch,32) == 1) return %x
        inc %x
      }
      return $false
    }
    
    ;########################################################
    ;########################################################
    ; THE EDGE
    ;########################################################
    ;########################################################
    
    alias -l offTheEdge {
      if ($theEdge < 0) {
        var %x = 1, %n = $hget($w($1),0).item, %p, %s, %e = $v1, %count = 1, %countvar, %minimum, %a
        while (%x <= %n) {
          %s = $hget($w($1),%x).data
          if (!$len(%countvar)) %countvar = %s
          elseif (%countvar == %s) inc %count
          if (%s > %minimum) || (!$len(%minimum)) %minimum = %s
          inc %x
        }
        if (%count != %n) {
          if (%minimum > %e) %minimum = %e
          %x = 1
          while ($len($hget($w($1),%x).item)) {
            %p = $hget($w($1),%x).item
            %s = $hget($w($1),%p)
            if (%s < %minimum) {
              %a = $iif($isAI($1,%p),-a,-u)
              msg $1 $cb2(%p) has tipped over $c3(The Edge) and fallen into obscurity! $cb3(Goodbye %p $+ !)
              preProcessHandStats $1 %p %a lose
              if (%a == -u) coinSave $1 %p
              hdel $g($1,1) %p
              hdel $w($1) %p
              top5PreWrite $1 %p %a
            }
            else {
              if (%s == %minimum) msg $1 $c2(%p) is on $cb3(The Edge) with $+(04,%s,) coins!
              inc %x
            }
          }
        }
      }
    }
    
    ;########################################################
    ;########################################################
    ; ARTIFICIAL INTELLIGENCE
    ;########################################################
    ;########################################################
    
    alias -l getIntel return $iif($findtok($ai,$1,1,32) <= $numtok($aiIntel,32),$iif($gettok($aiIntel,$findtok($ai,$1,1,32),32) isnum 1-10, $v1, 5),5)
    alias -l isAI return $istok($hget($s($1), ai),$2,32)
    
    alias -l listAI {
      var %x = 1, %y = $numtok($ai,32), %r, %u
      while (%x <= %y) {
        %u = $gettok($ai,%x,32)
        %r = %r $c2(%u) $c1($bracks($getIntel(%u))) /
        inc %x
      }
      return $left(%r,-1)
    }
    
    alias -l filterAI {
      var %x = 1, %y = $numtok($1-,32), %return, %a
      while (%x <= %y) {
        %a = $gettok($1-,%x,32)
        if ($istok($ai,%a,32)) && (!$istok(%return,%a,32)) %return = $addtok(%return,%a,32)
        inc %x
      }
      return %return
    }
    
    alias -l generateAI {
      var %x = 1, %y = $numtok($ai,32), %s, %u, %n = $iif($2- isnum 1-7,$iif($2- <= $numtok($ai,32),$2-,$numtok($ai,32)),$numtok($2-,32))
      while (%x <= %n) {
        if ($2- isnum 1-7) {
          while ($istok(%s,%u,32) || !%u) {
            %u = $gettok($ai,$rand(1,$numtok($ai,32)),32)
          }
          %s = %s %u
        }
        elseif ($istok($ai,$gettok($2-,%x,32),32)) %u = $gettok($2-,%x,32)
        else %u = $null
        if (%u) $+(.timerBlackJack,$1,JoinTimer,%u) -o 1 $rand(2,28) addPlayer $1 %u -a
        inc %x
      }
    }
    
    alias -l rollAI {
      var %x = 1, %ai = $hget($s($1), ai), %y = $numtok(%ai, 32), %player
      while (%x <= %y) {
        %player = $gettok(%ai,%x,32)
        if (!$istok(double.stand, $hget($a($1,1), %player), 46)) timeAI $1 %player
        inc %x
      }
    }
    
    alias -l performAIAction {
      if ($timer($+(BlackJack,$1,DrawTimer))) {
        var %action = stand, %intel = $getIntel($2), %dealer = $cardTotal($1, -d).hard, %hard = $cardTotal($1,-u,$2).hard, %soft = $cardTotal($1,-u,$2).soft, %d = $iif($numtok($hget($g($1,1), $2), 32) == 2 || $doubleWith3orMoreCards,1,0), %s = $iif($cardPair($hget($g($1,1),$2)),$ifmatch,0)
        if (%s == A) && ($hget($g($1,2),$2)) && ($noResplitWithAces) %s = 0
        if (%hard < 12) || (%soft < 8) %action = hit
        if (%intel > 1) && (%hard < 17) %action = hit
        if (%intel > 1) && (%s) && (%soft == 2) %action = split
        if (%intel > 2) && (%dealer < 11) && (%hard isnum 10-11) %action = double
        if (%intel > 2) && (%dealer > 6) && ((%soft > 7) && (%hard > 13)) %action = stand
        if (%intel > 3) && (%dealer isnum 2-6) && (%hard > 11) && (%soft > 7) %action = stand
        if (%intel > 3) && (%s) && (%hard == 16) && (%dealer < 11) %action = split
        if (%intel > 4) && (%dealer isnum 2-3) && (%hard < 14) && (!$istok(double.split,%action,46)) %action = hit
        if (%intel > 4) && (%dealer > 6) && ((%hard < 15) || (%soft < 8) && (!$istok(double.split,%action,46))) %action = hit
        if (%intel > 5) && (%dealer == 9) && (%soft < 9) && (%action != split) %action = hit
        if (%intel > 5) && (%dealer isnum 10-11) && (%soft == 8) %action = hit
        if (%intel > 5) && (%s) && (%dealer isnum 3-6) && ($istok(4.6.12.14.18,%hard,46)) %action = split
        if (%intel > 6) && (%dealer == 10) && (%hard isnum 10-11) %action = hit
        if (%intel > 6) && (%dealer == 9) && (%hard isnum 10-11) %action = double
        if (%intel > 6) && (%dealer == 11) && (%hard < 17) && (%soft > 2) %action = hit
        if (%intel > 7) && (%dealer == 3) && (%hard == 13) && (%soft == 13) %action = stand
        if (%intel > 7) && (%dealer > 7) && (%hard isnum 12-16) && (!$istok(double.split,%action,46)) %action = hit
        if (%intel > 7) && (%s) && (%dealer == 2) && (%hard isnum 4-6) %action = split
        if (%intel > 7) && (%s) && (%dealer == 7) && ($istok(4.6.14.16,%hard,46)) %action = split
        if (%intel > 8) && (%dealer isnum 3-6) && (%hard == 9) %action = double
        if (%intel > 8) && (%dealer isnum 5-6) && (%soft isnum 2-8) && (%hard > 11) %action = $iif(!%d && %soft == 8,stand,double)
        if (%intel > 8) && (%dealer == 7) && (%hard isnum 15-16) && (%action != split) %action = hit
        if (%intel > 8) && (%s) && (%hard == 18) && ($istok(4.5.6.8.9,%dealer,46)) %action = split
        if (%intel > 9) && (%dealer == 4) && (%soft isnum 5-8) && (%hard > 11) && (%action != split) %action = $iif(!%d && %soft == 8,stand,double)
        if (%intel > 9) && (%dealer == 3) && (%soft isnum 7-8) && (%hard > 11) && (%action != split) %action = $iif(!%d && %soft == 8,stand,double)
        if (%action == hit) || ((%action == double) && (!%d)) drawCardAction $1 $2
        elseif (%action == double) drawCardAction $1 $2 -d
        elseif (%action == split) splitAction $1 $2
        else standAction $1 $2
        if (!$istok(double.stand, $hget($a($1,1), $2), 46)) timeAI $1 $2
      }
    }
    
    alias -l timeAI {
      $+(.timerBlackJack,$1,DrawTimer,$2) -o 1 $rand(2,7) performAIAction $1 $2
    }
    
    ;########################################################
    ;########################################################
    ; SHOE MANAGEMENT
    ;########################################################
    ;########################################################
    
    alias -l createDeck {
      var %i = 1, %d = $calc($hget($s($1), decks) * 52)
      while (%i <= %d) {
        hadd $d($1) %i 1
        inc %i
      }
    }
    
    alias -l cardsRemaining return $hget($d($1), 0).item
    
    alias -l drawCard {
      if (!$cardsRemaining($1)) checkShuffle $1
      var %r = $rand(1,$cardsremaining($1)), %t = $hget($d($1), %r).item
      hdel $d($1) %t
      return $+($mid($suits,$calc((%t % 4) + 1),1),_,$cardify($calc((%t % 13) + 1)))
    }
    
    ;########################################################
    ;########################################################
    ; GAME FLOW
    ;########################################################
    ;########################################################
    
    alias -l blackjackStart {
      hfreedom $1
      hmake $g($1,1) 1
      hmake $a($1,1) 1
      hmake $d($1) $floor($calc(($iif($decks isnum 1-8,$v1,2) * 52) / 10))
      hmake $w($1) 1
      hmake $s($1) 1
      hadd $s($1) decks $iif($decks isnum 1-8,$v1,2)
      hadd $s($1) stats $iif($statEnable,1,0)
      msg $1 $c2($2) has started a game of $cb3(Blackjack Race!) Type $c2(!join) to join the game, you have $c1(30 seconds!)
      $+(.timerBlackJack,$1,JoinTimer) -o 1 30 startGame $1
      if ($3) generateAI $1 $3-
    }
    
    alias -l addPlayer {
      if (!$hget($g($1,1), $2)) {
        hadd $g($1,1) $2 check
        hadd $w($1) $2 0
        if ($3) && (a isin $3) hadd $s($1) ai $iif($hget($s($1), ai),$ifmatch $2,$2)
        msg $1 $c2($2) $+ $iif(($3) && (a isin $3),$+($chr(32),$bracks(AI level $getIntel($2)))) has joined the game! $c1($players($1)) players joined! $iif($hget($g($1,1), 0).item < 7 && $timer($+(BlackJack,$1,JoinTimer)).secs > 1,You've $c1($timer($+(BlackJack,$1,JoinTimer)).secs) seconds left to join!)
        if ($hget($g($1,1), 0).item > 6) startGame $1 -f
      }
    }
    
    alias -l startGame {
      $+(.timerBlackJack,$1,JoinTimer*) off
      if (!$players($1)) {
        msg $1 Nobody has joined the game. $c2(1 player) is required! Turning off.
        blackjackStop $1 -f
      }
      else {
        if ($players($1) == 1) {
          while ($players($1) < 2) {
            if (($isAI($1, $hget($g($1,1), 1).item)) && ($numtok($ai,32) < 2)) || (!$ai) addPlayer $1 $+(Agent,$rand(11111,99999)) -a
            else addPlayer $1 $gettok($ai,$rand(1,$numtok($ai,32)),32) -a
          }
        }
        hadd $s($1) original_players $players($1)
        createDeck $1
        var %text = The aim is to win $cb1($finish coins) from the $c2(Dealer) before everyone else. Bet amounts are in units of $winSingle $+ , $cb3($iif($hget($s($1), decks) > 1,$v1 decks,1 deck)) in use. Get ready...
        if ($2) && (f isin $2) msg $1 There are a maximum of $c1($players($1) players!) %text
        else msg $1 $c1(Time is up!) There are $c1($players($1) players!) %text
        $+(.timerBlackJack,$1,RepeatGame) -o 1 10 startRound $1
      }
    }
    
    alias -l startRound {
      createDefaults $1
      if ($actionsComplete($1)) $+(.timerBlackJack,$1,AutoTimer) -o 1 2 checkWinner $1 -f
      else {
        $+(.timerBlackJack,$1,DrawTimer) -o 1 30 checkWinner $1
        if ($hget($s($1), ai)) rollAI $1
      }
    }
    
    alias -l createDefaults {
      var %x = 1, %p = $players($1), %player, %actions
      hadd $s($1) dealer $drawCard($1)
      hadd $s($1) actions $hget($g($1,1),0).item
      hadd $s($1) completed 0
      while (%x <= %p) {
        %player = $hget($g($1,1), %x).item
        hadd $g($1,1) %player $drawCard($1) $drawCard($1)
        %actions = $iif($numerifyTotal($cardTotal($1,-u,%player).hard) < 21,hit,stand)
        hadd $a($1,1) %player %actions
        if (%actions == stand) hinc $s($1) completed 1
        msg $1 $c2($+(%player,:)) Your cards are: $cardflair($hget($g($1,1), %player)) :: Total: $bracks($cardTotal($1,-u,%player)) $iif(%actions == hit,:: You can: !hit !stand !double $+ $iif($cardPair($hget($g($1,1), %player)),$+($chr(32),!split))) $+ $iif(%actions == hit,$+($chr(32),!surrender)))
        inc %x
      }
      msg $1 The $cb2(Dealer) is showing: $cardflair($hget($s($1), dealer))
    }
    
    alias -l createSplits {
      if ($3) {
        var %temp = $hget($g($1,1),$2)
        hadd $g($1,1) $2 $hget($g($1,$3),$2)
        hadd $g($1,$3) $2 %temp
        hadd $a($1,$3) $2 $hget($a($1,1),$2)
      }
      hadd $g($1,1) $2 $hget($g($1,1),$2) $drawCard($1)
      var %one = $iif(($splitAcesOneCardOnly) && ($gettok($gettok($hget($g($1,1),$2),1,32),2,95) == A),1,0), %actions = $iif($numerifyTotal($cardTotal($1,-u,$2).hard) < 21 && !%one,hit,stand)
      hadd $a($1,1) $2 %actions
      msg $1 $c2($+($2,:)) Your cards are: $cardflair($hget($g($1,1), $2)) :: Total: $bracks($cardTotal($1,-u,$2)) $iif(%actions == hit && !%one,:: You can: !hit !stand !double $+ $iif($cardPair($hget($g($1,1), $2)) && (($cardPair($hget($g($1,1), $2)) != A) || (!$noResplitWithAces)),$+($chr(32),!split)))
      if (%actions == stand) {
        hinc $s($1) completed 1
        if ($splitHand($1,$2)) forwardSplitter $1 $2 $splitHand($1,$2)
        elseif ($actionsComplete($1)) checkWinner $1 -f
      }
    }
    
    alias -l forwardSplitter {
      createSplits $1-
    }
    
    alias -l blackjackStop {
      if ($hget($s($1),stats)) {
        var %x = 1, %f, %u, %p = $players($1), %w, %winner = $3
        while ($hget($g($1,1), %x).item) {
          %u = $ifmatch
          %f = $iif($isAI($1,%u),-a,-u)
          %w = $iif(%winner && ($2 != -f),$iif(%winner == %u,win,lose),draw)
          preProcessHandStats $1 %u %f %w
          top5PreWrite $1 %u %f
          if (%f == -u) coinSave $1 %u
          inc %x
        }
        top5Sort
      }
      hfreedom $1
    }
    
    ;########################################################
    ;########################################################
    ; POST HAND
    ;########################################################
    ;########################################################
    
    alias -l checkWinner {
      $+(.timerBlackJack,$1,DrawTimer,*) off
      var %dealer = $dealerOption($1)
      dealerDraw $1 %dealer
      roundDisplay $1 %dealer $iif($2,$2)
    }
    
    alias -l roundDisplay {
      var %t = $hget($s($1), dealer), %win = $getWinner($1).win, %draw = $getWinner($1).draw, %lose = $getWinner($1).lose, %finished = $cb1($iif(f isin $3,All hands are finished!,Time is up!))
      var %displaywin = $formatPlayers($1, %win).win, %displaylose = $formatPlayers($1, %lose).lose, %displaydraw = $formatPlayers($1, %draw).draw
      if ($istok(1.2,$2,46)) msg $1 %finished The $cb2(Dealer) shows $cardflair($gettok(%t,1,32)) and $iif($2 = 2,draws the following cards:,drew the card:) $cardflair($gettok(%t,2-,32)) :: Total: $cb2($cardTotal($1, -d).hard)
      elseif ($2 == 0) msg $1 %finished Everyone went $c1(bust) so the $cb2(Dealer) wins
      elseif ($2 == 4) msg $1 %finished Everyone $c1(surrendered) so the $cb2(Dealer) doesn't draw cards
      else msg $1 %finished The $cb2(Dealer) can't make $c1(Blackjack) so doesn't draw cards
      if (%win) msg $1 $c1($iif($numtok(%win, 32) != 1,$v1 players,%win)) beat the dealer $+ $iif($numtok(%win, 32) != 1,: %displaywin,: $gettok(%displaywin,2-,32))
      if (%draw) msg $1 $c1($iif($numtok(%draw, 32) != 1,$v1 players,%draw)) managed to draw $+ $iif($numtok(%draw, 32) != 1,: %displaydraw,: $gettok(%displaydraw,2-,32))
      if (!%win) && (!%draw) && (%lose) && ($istok(1.2,$2,46)) msg $1 The $cb2(Dealer) beat everyone with: $cardflair(%t) :: Total: $cb2($cardTotal($1,-d).hard)
      $+(.timerBlackJack,$1,nextRound) -o 1 2 nextRound $1
    }
    
    alias -l checkShuffle {
      var %r = $cardsRemaining($1)
      if (%r < $calc(($players($1) + 1) * 7)) {
        msg $1 $cb3(The cards are getting shuffled and reloaded) $bracks($+($round($calc((%r / ($hget($s($1), decks) * 52)) * 100),2),$chr(37)) density)
        createDeck $1
      }
      else msg $1 $cb3(%r cards) remain in the shoe $bracks($+($round($calc((%r / ($hget($s($1), decks) * 52)) * 100),2),$chr(37)) density)
    }
    
    alias -l nextRound {
      msg $1 Current scores: $allScores($1)
      offTheEdge $1
      if ($overallWinner($1)) {
        var %winner = $ifmatch, %coins = $hget($w($1), %winner)
        $+(.timerBlackJack,$1,announceWinner) -o 1 2 msg $1 Okay we have an $cb3(overall winner.) $cb2(%winner) wins the game, finishing with $c1(%coins coins!)
        $+(.timerBlackJack,$1,endGame) -o 1 4 blackjackStop $1 -m %winner
      }
      elseif ($hget($s($1), stop)) {
        $+(.timerBlackJack,$1,announceStop) -o 1 2 msg $1 $cb3(Blackjack Race) was set to be stopped by $c2($hget($s($1), stop)) and has been terminated 
        $+(.timerBlackJack,$1,endGame) -o 1 4 blackjackStop $1 -f
      }
      else {
        hdel -w $a($1,1) *
        hfreedomMirror $1
        $+(.timerBlackJack,$1,ShuffleTimer) -o 1 5 checkShuffle $1
        if ($hget($s($1),replace)) $+(.timerBlackJack,$1,ReplaceUser) -o 1 10 replaceUser $1
        $+(.timerBlackJack,$1,RepeatGame) -o 1 12 startRound $1
      }
    }
    
    alias -l replaceUser {
      var %x = 1, %u = $hget($s($1),replace), %y = $numtok(%u,32), %user, %a
      hdel $s($1) replace
      while (%x <= %y) {
        %user = $gettok(%u,%x,32)
        if ($hget($g($1,1), %user)) {
          while (!%a) || ($hget($g($1,1), %a)) {
            %a = $iif($rand(1,20) == 1,$+($chr(74),$chr(109),m,$chr(105),$chr($+(10,1))),$+(Agent,$rand(10000,99999)))
          }
          preProcessHandStats $1 %user -u lose
          top5PreWrite $1 %user -u
          coinSave $1 %user
          hadd $g($1,1) %a $hget($g($1,1),%user)
          hadd $w($1) %a $hget($w($1),%user)
          hdel $g($1,1) %user
          hdel $w($1) %user
          hadd $s($1) ai $iif($hget($s($1), ai),$ifmatch %a,%a)
          msg $1 $cb3(%a) replaces $c2(%user) and joins the game!
        }
        inc %x
      }
    }
    
    ;########################################################
    ;########################################################
    ; CARD FUNCTIONS
    ;########################################################
    ;########################################################
    
    alias -l numerifyTotal {
      if ($1- == TOO MANY) return 30
      if ($1- == BLACKJACK) return 22
      return $1-
    }
    
    alias -l cardflair {
      tokenize 32 $1-
      var %x = 1 ,%s ,%d
      while ($eval($+($,%x),2)) {
        %d = $remove($ifmatch,_)
        %s = %s $iif($left(%d,1) isin $left($suits,2),%d,$+(04,%d,))
        inc %x
      }
      return %s
    }
    
    alias -l cardPair {
      if ($gettok($gettok($1-,1,32),2,95) == $gettok($gettok($1-,2-,32),2-,95)) return $v1
      return $false
    }
    
    alias -l cardTotal {
      var %s = $iif($2 == -u,$hget($g($1,1), $3),$iif($2 == -d,$hget($s($1), dealer),$2-)), %x = 1, %c = $numtok(%s, 32), %return = 0, %n, %soft = 0
      while (%x <= %c) {
        %n = $replace($gettok($gettok(%s,%x,32),2,95),A,1,J,10,Q,10,K,10)
        inc %return %n
        if (%n == 1) && (!%soft) && (%return < 12) inc %soft
        elseif (%soft) && (%return > 11) dec %soft
        if (%return > 21) return TOO MANY
        inc %x
      }
      if (%soft) {
        if (%return == 11) return $iif(%x == 3,BLACKJACK,21)
        if (!$prop) return $+(%return,/,$calc(%return + 10))
        if ($prop == hard) return $calc(%return + 10)
      }
      return %return
    }
    
    alias -l formatPlayers {
      var %x = 1, %y = $numtok($2-,32), %u, %return, %split = 1, %hand, %i, %c, %d
      while (%x <= %y) {
        %u = $gettok($2-,%x,32)
        %hand = $hget($g($1,%split), %u)
        if ($dealerVS($1, %hand) == $prop) {
          if (!%i) { %return = %return %u $+ : $bracks($cardflair(%hand)) / | %i = 1 }
          else %return = $left(%return,-1) $bracks($cardflair(%hand)) /
          processHandStats $1 %u total 1 $iif($isAI($1, %u),-a)
          processHandStats $1 %u $prop 1 $iif($isAI($1, %u),-a)
          if ($prop == win) && ($numerifyTotal($cardTotal($1, %hand).hard) == 22) {
            hinc $w($1) %u $winBlackjack
            processHandStats $1 %u coins $winBlackjack $iif($isAI($1, %u),-a)
          }
          else {
            %d = $iif($hget($a($1,%split),%u) == Double,$v2,Single)
            %c = $eval($+($,$prop,%d),2)
            hinc $w($1) %u %c
            if (%d == Double) processHandStats $1 %u double 1 $iif($isAI($1, %u),-a)
            processHandStats $1 %u coins %c $iif($isAI($1, %u),-a)
          }
        }
        inc %split
        if ($hget($g($1,%split), %u)) continue
        %split = 1
        %i = 0
        inc %x
      }
      return $left(%return,-1)
    }
    
    ;########################################################
    ;########################################################
    ; DEALER FUNCTIONS
    ;########################################################
    ;########################################################
    
    alias -l dealerOption {
      var %x = 1, %y = $hget($g($1,1),0).item, %return = 0, %t, %m = 1, %p, %q = 1
      while (%x <= %y) {
        %p = $hget($g($1,1),%x).item
        if ($hget($g($1,%m),%p) == check) inc %q
        else {
          %t = $numerifyTotal($cardTotal($1, $hget($g($1,%m), %p)).hard)
          if (%t < 22) return 2
          elseif (%t == 22) %return = 1
          inc %m
          if ($hget($g($1,%m),%p)) continue
        }
        %m = 1
        inc %x
      }
      if (%return == 1) && (!$istok(10.11,$cardTotal($1,-d).hard,46)) return 3
      if (%q < %x) return %return
      return 4
    }
    
    alias -l dealerDraw {
      while ($cardTotal($1,-d).hard < 17) || (($dealerHitsOnSoft17) && ($cardTotal($1,-d).soft < 8)) {
        if ($istok(0.3.4,$2,46)) break
        hadd $s($1) dealer $hget($s($1), dealer) $drawCard($1)
        if ($2 == 1) break
      }
    }
    
    alias -l dealerVS {
      var %cards = $numerifyTotal($cardTotal($1,$2-).hard), %dealer = $numerifyTotal($cardTotal($1,-d).hard)
      if ((%cards < %dealer) && (%dealer < 30)) || (%cards == 30) return lose
      if (%cards == %dealer) return draw
      return win
    }
    
    ;########################################################
    ;########################################################
    ; OTHER FUNCTIONS
    ;########################################################
    ;########################################################
    
    alias -l players return $iif($hget($g($1,1), 0).item, $ifmatch, 0)
    
    alias -l getWinner {
      var %return , %x = 1, %p = $players($1), %player, %split = 1, %h
      while (%x <= %p) {
        %player = $hget($g($1,1), %x).item
        if ($hget($g($1,1),%player) != check) {
          %h = $hget($g($1, %split), %player)
          inc %split
          if ($prop == $dealerVS($1,%h)) %return = $addtok(%return,%player,32)
          elseif ($hget($g($1,%split), %player)) continue
          %split = 1
        }
        inc %x
      }
      return %return
    }
    
    alias -l allScores {
      var %return, %x = 1, %y = $hget($w($1), 0).item, %s
      while (%x <= %y) {
        %s = $hget($w($1), %x).data
        %return = %return $hget($w($1), %x).item $+ : $iif(%s == 0,0,$+(,$iif(%s < 0,04,$iif(%s >= 100,06,03)),%s,)) ::
        inc %x
      }
      return $left(%return, -2)
    }
    
    alias -l overallWinner {
      var %return, %x = 1, %y = $hget($w($1), 0).item, %score = $finish - 1, %data
      while (%x <= %y) {
        %data = $hget($w($1), %x).data
        if (%data >= %score) {
          if (%data > %score) %return = $hget($w($1), %x).item
          else %return = %return $hget($w($1), %x).item
          %score = %data
        }
        inc %x
      }
      if (%x == 2) return $hget($w($1), 1).item
      if ($numtok(%return, 32) == 1) return %return
      return $false
    }
    
    ;########################################################
    ;########################################################
    ; STATISTICS WRITE
    ;########################################################
    ;########################################################
    
    alias -l preProcessHandStats {
      if ($hget($s($1),stats)) {
        var %p = $hget($s($1),original_players)
        processHandStats $1 $2 total 1 $3 games
        processHandStats $1 $2 players %p $3 games
        processHandStats $1 $2 $4 1 $3 games
        processHandStats $1 $2 $+($4,_,single) $iif($4 == win,$calc(%p - 1),1) $3 games
        processHandStats $1 $2 coins $iif($hget($w($1),$2),$ifmatch,0) $3 games
      }
    }
    
    alias -l processHandStats {
      if ($hget($s($1),stats)) {
        var %a = $iif($5 && a isin $5,$true), %z = $iif($6,$6,hands), %f = $iif(%a,$+(%z,_ai),%z)
        if (!%a) || ($istok($ai,$2,32)) writeini -n $f(%f) $2 $3 $calc($getStat($f(%f),$2,$3) + $4)
      }
    }
    
    alias -l userStats {
      if (!$prop) {
        if ($getStat($f($iif($2,$2,hands)),$1,total)) return $true
        if ($getStat($f($iif($2,$2,hands_ai)),$1,total)) return $true
        return $false
      }
      if ($prop == ai) return $iif($getStat($f($+($iif($2,$2,hands),_ai)),$1,total),$true,$false)
      if ($prop == user) return $iif($getStat($f($+($iif($2,$2,hands))),$1,total),$true,$false)
    }
    
    alias -l coinSave {
      if ($hget($s($1),stats)) {
        var %new = $iif($hget($w($1),$2),$ifmatch,0)
        writeini -n $f(coins) $2 coins $calc($getStat($f(coins),$2,coins) + %new)
        blackjackCoinListener $2 %new $getStat($f(coins),$2,coins)
      }
    }
    
    alias -l top5Write {
      var %a = $iif(a isin $2,$true), %f = $iif($istok(cph.wr,$3,46),$f($iif(%a,hands_ai,hands)),$f($iif(%a,games_ai,games))), %data = $top5Data($1,%f,$3), %l
      if ($len(%data)) {
        %l = $read($l($3),w,$+(*,$chr(32),$1,$iif(%a,$+($chr(32),-a),$null)))
        %l = $iif($readn,$ifmatch,0)
        write $iif(%l,$+(-l,%l)) $l($3) %data $1 $iif(%a,-a,$null)
        writeini -n %f $1 $3 %data
      }
    }
    
    alias -l top5Data {
      if ($istok(cpg.cph,$3,46)) return $round($calc($getStat($2,$1,coins) / $getStat($2,$1,total)),2)
      if ($3 == h2h) return $+($round($calc(($getStat($2,$1,win_single) / ($getStat($2,$1,win_single) + $getStat($2,$1,lose_single))) * 100),2),$chr(37))
      if ($3 == wr) return $round($calc(($getStat($2,$1,win) / ($getStat($2,$1,win) + $getStat($2,$1,lose) + $getStat($2,$1,draw))) * 100),2)
      var %t = $getStat($2,$1,total)
      return $round($calc(((($getStat($2,$1,win) * ((%t * ($getStat($2,$1,players) / %t)) / %t)) / %t) / ($getStat($2,$1,players) / %t)) * 100),2)
    }
    
    alias -l top5PreWrite {
      var %x = 1
      if ($hget($s($1),stats)) {
        if ($istok($ai,$2,32) || (a !isin $3)) {
          while ($gettok($top5,%x,46)) {
            top5Write $2 $3 $ifmatch
            inc %x
          }
        }
      }
    }
    
    alias -l top5Sort {
      var %x = 1, %l
      while ($gettok($top5,%x,46)) {
        %l = $l($ifmatch)
        if ($exists(%l)) fs %l
        inc %x
      }
    }
    
    ;########################################################
    ;########################################################
    ; STATISTICS DISPLAY
    ;########################################################
    ;########################################################
    
    alias -l displayStats {
      var %a = $iif((($2 == -a) && $getStat($f(hands_ai),$3,total)) || !$getStat($f(hands),$3,total),$true), %f = $f($+(hands,$iif(%a,_ai))), %f2 = $f($+(games,$iif(%a,_ai))), %x = 1, %c, %g, %h
      var %t = $getStat(%f,$3,total), %w = $getStat(%f,$3,win), %d = $getStat(%f,$3,draw), %o = $round($calc(($getStat(%f,$3,double) / (%w + $getStat(%f,$3,lose) + %d)) * 100),2) $+ $chr(37)
      while ($gettok($top5,%x,46)) {
        %g = $ifmatch
        %h = $read($l(%g),w,$+(*,$chr(32),$3,$iif(%a,$+($chr(32),-a),$null)))
        %c = %c $+($upper(%g),:) $c3($ord($iif($readn,$ifmatch,$lines($l(%g))))) $c2(/)
        inc %x
      }
      msg $1 Play stats for $cb1($3 $+ :) Hands: $c3(%t) $c2(/) Wins: $c3(%w) $c2(/) Draws: $c3(%d) $c2(/) CPH: $c3($top5Data($3,%f,cph)) $c2(/) Win Rate: $c3($top5Data($3,%f,wr)) $c2(/) Double Rate: $c3(%o)
      msg $1 Game stats for $cb1($3 $+ :) Games: $c3($getStat(%f2,$3,total)) $c2(/) Wins: $c3($getStat(%f2,$3,win)) $c2(/) CPG: $c3($top5Data($3,%f2,cpg)) $c2(/) Game Rating: $c3($top5Data($3,%f2,gr)) $c2(/) H2H Tier: $c3($top5Data($3,%f2,h2h))
      msg $1 List stats for $cb1($3 $+ :) $gettok(%c,$+(1-,$calc($numtok(%c,32) - 1)),32)
    }
    
    alias -l displayCoins {
      %f = $f(coins)
      if ($ini(%f,$3)) msg $1 Total coins for $cb1($3 $+ :) $c3($getStat(%f,$3,coins))
    }
    
    alias -l displayTop5 {
      var %x = 1, %f = $l($3), %l = $lines(%f), %c = 0, %r, %f2, %a, %game = $iif($istok(cpg.gr.h2h,$3,46),games,hands), %y = $iif(%game == games,$statMinGames,$statMinHands), %p
      msg $1 $cb3(Top 5) $c3($iif(a isin $2,robots,$iif(u isin $2,users,players)) for:) $c2($iif($3 == cph,Coins Per Hand,$iif($3 == wr,Win Rate,$iif($3 == cpg,Coins Per Game,$iif($3 == gr,Game Rating,Head to Head Tier))))) $bracks(min %y %game)
      while (%x <= %l) && (%c < 5) {
        %r = $read(%f,%x)
        %p = $gettok(%r,2,32)
        %a = $iif($gettok(%r,3,32) == -a,$true,$false)
        %f2 = $f($iif(%a,$+(%game,_,ai),%game))
        if ($getStat(%f2,%p,total) >= %y) && ((($2 == -a) && (%a)) || (($2 == -u) && (!%a)) || ($2 == -n)) {
          inc %c
          msg $1 $cb1($+(%c,$chr(46))) $c2(%p) $iif(%a,$+($chr(32),$bracks(AI level $getIntel(%p)))) $cb3($bracks($gettok(%r,1,32)))
        }
        inc %x
      }
    }
    
    alias -l displayCompare {
      var %x = 1, %a1 = $iif((($1 == -a) && ($getStat($f(hands_ai),$2,total))) || (!$getStat($f(hands),$2,total)),$true,$false), %a2 = $iif((($3 == -a) && ($getStat($f(hands_ai),$4,total))) || (!$getStat($f(hands),$4,total)),$true,$false)
      var %f, %r1, %r2, %t1, %t2
      while (%x <= $numtok($top5,46)) {
        %f = $l($gettok($top5,%x,46))
        %r1 = $read(%f,w,$+(*,$chr(32),$2,$iif(%a1,$+($chr(32),-a),$null)))
        inc %t1 $iif($readn,$ifmatch,$lines(%f))
        %r2 = $read(%f,w,$+(*,$chr(32),$4,$iif(%a2,$+($chr(32),-a),$null)))
        inc %t2 $iif($readn,$ifmatch,$lines(%f))    
        inc %x
      }
      %r2 = $round($calc((%t1 / (%t1 + %t2)) * 100),2)
      %r1 = $calc(100 - %r2)
      if (%r1 > %r2) msg $5 $cb1(>>>) $cb2($2) $cb1(<<<) $cb3($+(%r1,$chr(37))) $c1(vs) $+(%r2,$chr(37)) $c2($4)
      elseif (%r2 > %r1) msg $5 $c2($2) $+(%r1,$chr(37)) $c1(vs) $cb3($+(%r2,$chr(37))) $cb1(>>>) $cb2($4) $cb1(<<<)
      else  msg $5 $cb2($2) $cb3($+(%r1,$chr(37))) $c1(vs) $cb3($+(%r2,$chr(37))) $cb2($4)
    }
    
    ;########################################################
    ;########################################################
    ; HELPER FUNCTIONS (use outside script)
    ;########################################################
    ;########################################################
    
    ; return coins in coins.ini
    alias blackjackGetCoins {
      return $getStat($f(coins),$1,coins)
    }
    
    ; remove coins from coins.ini
    alias blackjackDelCoins {
      var %u = $1, %f = $f(coins)
      writeini -n %f %u coins $calc($getStat(%f,%u,coins) - $iif($2 isnum,$ifmatch,0))
      if ($isid) return $getStat(%f,$1,coins)
    }
    
    ;########################################################
    ;########################################################
    ; ACCUMULATED COINS LISTENER
    ;########################################################
    ;########################################################
    
    ; listener, each time the user accumulates more coins (runs once per user per game played)
    ; you can 'transport' the coins accumulated to a separate script/file, and/or delete them
    ; these coins are displayed by the !coins command, removing them will be reflected.
    ; you can copy new points ($2) to a global/master file which works with your other scripts, if you want
    ; take note that $2 and $3 can both be negatives, make proper checks to keep things in accordance with the rest of your script
    
    alias -l blackjackCoinListener {
      ; $1 = the username
      ; $2 = coins added for user after current game
      ; $3 = new total coins for user
      ; your commands here:
    
      ; example echo after each time coins are added (uncomment to try)
      ; echo -a $1 finished the game, $iif($2 >= 0,winning,losing) $2 coins, and now has $3 total coins!
    
      ; example removing coins just earnt:
      ; blackjackDelCoins $1 $2
    
      ; example write to a separate file which holds stars collected by users. Each star is worth 20 coins
      ; also remove N stars worth of coins from the coin bank.
      ; if ($3 > 0) {
      ;   var %file = stars.ini, %coinsPerStar = 20, %stars = $floor($calc($3 / %coinsPerStar))
      ;   writeini %file $1 stars $calc($iif($readini(%file,$1,stars),$v1,0) + %stars)
      ;   blackjackDelCoins $1 $calc($3 - ($3 % %coinsPerStar))
      ; }
    
      ; hint: removing the if statement surrounding the previous 3 commands will hold it's current functionality,
      ; but will also remove stars from the stars file if the user falls to -20 or less

     

  5. add into a new remote file in a clean mirc

    About:
    this is a multi server multi channel bot,
    it will provide you with a user system for your channels and protect each user accordingly.
    to begin youll have too add yourself as botowner and set your bots trigger

    in the bot type
    /addowner Your-Nick
    ** You must be on the same channel and network as the bot

    then
    /set %trigger !
    ** or any trigger you choose

    then your ready to set it up for a chanel.
    first add your server to autojoin with ?addserver add server
    then a channel to autojoin with ?autojoin add network #channel

    now your ready to set yourself as the channel owner by typing
    !addowner nick channel
    again the nick must be on the channel at the time of adding.
    its best if the bot is the real channel owner, and you get your status from the bot.

    now type
    !commands
    and take a look through the commands and have fun 🙂

    ** COMMANDS
    ?about bot/nick
    ?act channel message
    ?addowner nick channel
    ?addadmin nick
    ?addop nick
    ?addhelper nick
    ?addvoice nick
    ?autojoin add/del/list network channel
    ?badnick add/del nick
    ?ban add/del nick reason
    ?baninfo total/nick
    ?bigflood on/off/status # ( eg: ?bigflood on 200 ) ( 200 characters per message sent )
    ?botmaster nick
    ?checknick nick
    ?clonescanner on/off
    ?commands
    ?cycle channel
    ?dns nick/address
    ?flood on/off/status #:# ( eg: ?flood on 10:3 )( 10 lines in 3 seconds )
    ?flyby on/off/status
    ?global messsage
    ?greet on/off message
    ?ircop scan channel
    ?kick nick reason
    ?kill
    ?lastseen nick
    ?modelock list/modes
    ?protect on off
    ?reboot
    ?relay on channel_1 channel_2
    ?remember info_here ( the first word of your info, will be the trigger to retrieve the info )
    ?rules
    ?say channel message
    ?set nick/password nick/password
    ?server add/del server
    ?spam on/off/status
    ?stats nick ( or: ?stats reset nick )
    ?topiclock on/off topic
    ?trigger trigger
    /addowner nick ( Must be on the same channel )

    ** NOTE
    this bot recognises by nick and address, so if your hostmask changes alot
    this would most likely not be a good bot for you

    Made on IrCQNet
    works with anope type services

    this is still a work in progress so im open to suggestion
    although im tryin to keep away from such commands as !op !deop etc etc

     

    ;?about bot/nick
    ;?act channel message
    ;?addowner nick channel
    ;?addadmin nick 
    ;?addop nick 
    ;?addhelper nick
    ;?addvoice nick 
    ;?autojoin add/del/list network channel
    ;?badnick add/del nick
    ;?ban add/del nick reason
    ;?baninfo total/nick
    ;?bigflood on/off/status # ( eg: ?bigflood on 200 ) ( 200 characters per message sent )
    ;?botmaster nick
    ;?checknick nick
    ;?clonescanner on/off
    ;?commands
    ;?cycle channel
    ;?dns nick/address
    ;?flood on/off/status #:# ( eg: ?flood on 10:3 )( 10 lines in 3 seconds )
    ;?flyby on/off/status
    ;?forget info_here
    ;?global messsage
    ;?greet on/off message
    ;?ircop scan channel
    ;?kick nick reason
    ;?kill
    ;?lastseen nick
    ;?modelock list/modes
    ;?protect on off
    ;?reboot
    ;?relay on channel_1 channel_2
    ;?remember info_here ( the first word of your info, will be the trigger to retrieve the info )
    ;?remuser nick channel
    ;?rules
    ;?say channel message
    ;?set nick/password nick/password
    ;?server add/del server
    ;?spam on/off/status
    ;?stats nick ( or: ?stats reset nick )
    ;?topiclock on/off topic
    ;?trigger trigger
    ;/addowner nick ( Must be on the same channel )
    /* 
    On Load/Unload Events 
    */
    on 1:load: { set %botstartdate $fulldate | echo -s 04,01**** Loaded %logo.l SassIRC 12,01m04,01I04,01R08,01C Channel Protection Bot %logo.r Coded By %logo.l PuNkTuReD %logo.r }
    on 1:unload: { echo -s 04,01**** Unloaded %logo.l SassIRC 12,01m04,01I04,01R08,01C Channel Protection Bot %logo.r Coded By %logo.l PuNkTuReD %logo.r }
    /* 
    On Start/Exit Events 
    */
    on *:start: { 
      if (!$hget(Badwords)) { hmake Badwords 20 }
      if ($exists(Badwords.hsh)) { hload Badwords Badwords.hsh } 
      if (!$hget(AutoJoin)) { hmake AutoJoin 20 }
      if ($exists(AutoJoin.hsh)) { hload AutoJoin AutoJoin.hsh } 
      if (!$hget(Servers)) { hmake Servers 20 }
      if ($exists(Servers.hsh)) { hload Servers Servers.hsh } 
      set -u5 %a 1
      set -u5 %b $hget(Servers,0).item
      while %a <= %b {
        if (%a == 1) { server $hget(Servers,%a).item | inc %a }
        else { server -m $hget(Servers,%a).item | inc %a }
      }
      else { haltdef }
    }
    on *:exit: { 
      if ($hget(Servers)) { hsave -o Servers Servers.hsh }
      if ($hget(AutoJoin)) { hsave -o AutoJoin AutoJoin.hsh }
      if ($hget(Badwords)) { hsave -o Badwords Badwords.hsh }
    } 
    /* 
    On Connect Event 
    */
    on *:connect: { nick %botnick | identify %botpass | join $hget(Autojoin,$network) }
    /* 
    On Join/Part/Quit Events 
    */
    on *:join:#: {
      set $+(%,$nick,totaljoin) $calc($($+(%,$nick,totaljoin),2) + 1)
      if ($($+(%,$chan,flyby),2) == on) { set -u60 $+(%,join,$chan,$nick) $nick }
      if (%serverrelay == on) && ($chan == %rchan) { relayevent $network $nick joined # }
      if (%clonescanner == on) && ($ialchan($strip($address($nick,2)),$chan,0) > 1) { .msg $chan %logo.l $nick %logo.r is a clone. %logo.l $ialchan($strip($address($nick,2)),$chan,0) %logo.r Active connections. From %logo.l $strip($address($nick,2)) %logo.r } 
      if (%relay == on) && ($chan == %chan1) { msg %chan2 Join %logo.l $nick %logo.r }
      if ($nick == $me) && ($chan == $gettok($readini(users.ini,modelock,$chan),1,32)) { .msg $chan %logo.l ModeLock Enforcer 04,01%logo.r | .msg $chan %logo.l Enforcing Modes %logo.r $gettok($readini(users.ini,modelock,$chan),2-,32) | mode $chan $gettok($readini(users.ini,modelock,$chan),2-,32) }
      if ($nick == $gettok($readini(badnicks.ini,$chan,$nick),1,32)) { ban -ku300 $chan $nick 2 Bad Nick. }
      if ($($+(%,greet,$chan),2) == on) { msg $chan $($+(%,joingreet,$chan),2) }
      if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),botmaster,$nick),2,32)) { .msg $chan %logo.l Bot Master %logo.r04,01 $nick has joined. }
      if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == owner) { .msg $chan %logo.l $chan 04,01Owner %logo.r  $+ $nick has joined. | mode $chan +qov $nick $nick $nick | halt }
      if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == admin) { .msg $chan %logo.l $chan 04,01Admin %logo.r  $+ $nick has joined. | mode $chan +aov $nick $nick $nick | halt }
      if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == op) { .msg $chan %logo.l $chan 04,01Op %logo.r  $+ $nick has joined. | mode $chan +ov $nick $nick | halt }
      if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == helper) { .msg $chan %logo.l $chan 04,01Helper %logo.r  $+ $nick has joined. | mode $chan +hv $nick $nick | halt }
      if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == voice) { .msg $chan %logo.l $chan 04,01Voice %logo.r  $+ $nick has joined. | mode $chan +v $nick | halt }
    }
    on *:part:#: {
      set $+(%,$nick,totalparts) $calc($($+(%,$nick,totalparts),2) + 1)
      if (%serverrelay == on) && ($chan == %rchan) { relayevent $network $nick parted # }
      if ($($+(%,join,$chan,$nick),2) == $nick) && ($($+(%,$chan,flyby),2) == on) { $iif($+(%,flyby,$chan),inc $+(%,flyby,$chan),set $+(%,flyby,$chan) 1) | ban -u300 $chan $nick 2 Fly-By Protect | .msg $chan %logo.l $($+(%,join,$chan,$nick),2) %logo.r was Fly-By %logo.l $($+(%,flyby,$chan),2) %logo.r Since $($+(%,botstartdate),2) }
      if (%relay == on) && ($chan == %chan1) { msg %chan2 Part %logo.l $nick %logo.r } 
      if (!$read(lastseen.txt, w, * $+ $nick- $+ *)) { write lastseen.txt %logo.l $nick %logo.r was last seen leaving %logo.l $chan %logo.r On %logo.l $fulldate %logo.r }
      else { write -dw $+ * $+ $nick $+ * lastseen.txt | write lastseen.txt %logo.l $nick %logo.r was last seen leaving %logo.l $chan %logo.r On %logo.l $fulldate %logo.r }
    }
    on 1:quit: {
      chkflyby
      set $+(%,$nick,totalquits) $calc($($+(%,$nick,totalquits),2) + 1)
      if (*.split isin $strip($1-)) {
        if (!%ns) { ame 4,1%logo.l NetSplit Detected 4,1%logo.r | set -u180 %ns 1 }
      }
      if (%relay == on) { msg %chan2 Quit - %logo.l $nick %logo.r }  
      if (!$read(lastseen.txt, w, * $+ $nick $+ *)) { write lastseen.txt %logo.l $nick %logo.r was last seen leaving %logo.l $network %logo.r On %logo.l $fulldate %logo.r }
      else { write -dw $+ * $+ $nick $+ * lastseen.txt | write lastseen.txt %logo.l $nick %logo.r was last seen leaving %logo.l $network %logo.r On %logo.l $fulldate %logo.r }
      if (%serverrelay == on) {
        var %a = $comchan($nick,0)
        while (%a) {
          if ($comchan($nick,%a) == %rchan) { relayevent $network $nick quit: $iif(($1-),$1-,No Quit Message) | dec %a }
          else { dec %a }
        }
      }
    }
    /* 
    On Nick Event 
    */
    on *:nick: {
      if (%relay == on) && ($chan == %chan1) { msg %chan2 %logo.l $nick %logo.r is now %logo.l $newnick %logo.r } 
      if ($nick == $gettok($readini(users.ini,botmaster,$nick),1,32)) { writeini users.ini botmaster $newnick $newnick $gettok($readini(users.ini,botmaster,$nick),2,32) | remini users.ini botmaster $nick } 
      var %a = 1
      var %b = $comchan($newnick,0)
      while %a <= %b { 
        if ($read(abuse.txt, w, $newnick $+ *)) { .msg $comchan($newnick,%a) $gettok($read(abuse.txt, w, $newnick $+ *),2-,32) }
        if ($newnick == $gettok($readini(badnicks.ini,$comchan($newnick,%a),$newnick),1,32)) { ban -ku300 $comchan($newnick,%a) $newnick 2 Bad Nick }
        if ($gettok($readini($+($network,users.ini),$comchan($newnick,%a),$nick),2,32) == owner) { writeini $+($network,users.ini) $comchan($newnick,%a) $newnick $gettok($readini(users.ini,$comchan($newnick,%a),$nick),1,32) owner | remini $+($network,users.ini) $comchan($newnick,%a) $nick }
        if ($gettok($readini($+($network,users.ini),$comchan($newnick,%a),$nick),2,32) == admin) { writeini $+($network,users.ini) $comchan($newnick,%a) $newnick $gettok($readini(users.ini,$comchan($newnick,%a),$nick),1,32) admin | remini $+($network,users.ini) $comchan($newnick,%a) $nick }
        if ($gettok($readini($+($network,users.ini),$comchan($newnick,%a),$nick),2,32) == op) { writeini $+($network,users.ini) $comchan($newnick,%a) $newnick $gettok($readini(users.ini,$comchan($newnick,%a),$nick),1,32) op | remini $+($network,users.ini) $comchan($newnick,%a) $nick }
        if ($gettok($readini($+($network,users.ini),$comchan($newnick,%a),$nick),2,32) == helper) { writeini $+($network,users.ini) $comchan($newnick,%a) $newnick $gettok($readini(users.ini,$comchan($newnick,%a),$nick),1,32) helper | remini $+($network,users.ini) $comchan($newnick,%a) $nick }
        if ($gettok($readini($+($network,users.ini),$comchan($newnick,%a),$nick),2,32) == voice) { writeini $+($network,users.ini) $comchan($newnick,%a) $newnick $gettok($readini(users.ini,$comchan($newnick,%a),$nick),1,32) voice | remini $+($network,users.ini) $comchan($newnick,%a) $nick }
        else { inc %a } 
    } }
    /* 
    On dns Event 
    */
    on 1:dns: {
      var %n = $dns(0)
      .msg %targ %logo.l DNS %logo.r Found %logo.l %n %logo.r Addresse(s) for %logo.l $dns(%n).addr %logo.r
      while (%n > 0) { .msg %targ %logo.l DNS %logo.r Address: %logo.l $dns(%n).addr %logo.r Ip: %logo.l $dns(%n).ip %logo.r | dec %n
    } }
    /* 
    On Topic Event 
    */
    on 1:topic:#: {
      if ($nick == ChanServ) || ($nick == Pazuzu) { halt }
      if ($nick == $me) || ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == owner) { set $+(%,topic,$3) $1- | halt }
      if ($($+(%,topiclock,$chan),2) == on) { .msg $chan %logo.l Enforcing Topic %logo.r $($+(%,topic,$chan),2) | topic $chan $($+(%,topic,$chan),2) }
    }
    /* 
    On Mode Event 
    */
    on *:mode:#: {
      if ($($+(%,protect,$chan),2) == on) {
        if ($chan == $gettok($readini(users.ini,modelock,$chan),1,32)) { 
          if ($nick == ChanServ) || ($nick == Pazuzu) { halt }
          if ($nick == $me) || ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == owner) { halt }
          else { mode $chan $replace($1-,+,-) | .msg $chan %logo.l Enforcing Modes %logo.r $gettok($readini(users.ini,modelock,$chan),2-,32) | mode $chan $gettok($readini(users.ini,modelock,$chan),2-,32) }
    } } }
    /* 
    On Ban/Unban Events 
    */
    on *:ban:#: { set $+(%,$nick,totalbans) $calc($($+(%,$nick,totalbans),2) + 1) | write banned.txt %logo.l $chan %logo.r Ban %logo.l $banmask %logo.r was banned by %logo.l $nick %logo.r on %logo.l $fulldate %logo.r }
    on *:unban:#: { write -dw $+ * $+ $2 $+ * banned.txt }
    /* 
    On Kick Event 
    */
    on *:kick:#: { 
      set $+(%,$nick,totalkicks) $calc($($+(%,$nick,totalkicks),2) + 1) 
      if ($chan == %rchan) { relayevent $network $nick kicked $knick from # }
      if ($($+(%,protect,$chan),2) == on) {  
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == admin) { halt }
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == owner) { halt }
        if ($address($knick,2) == $gettok($readini($+($network,users.ini),$chan,$knick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$knick),2,32) == op) { remini $+($network,users.ini) $chan $nick | invite $nick $chan | io | .msg $chan %logo.l $nick %logo.r You may not kick a channel op. | .msg $chan %logo.l $nick %logo.r you are now being stripped of your %logo.l Op %logo.r status. | mode -o $nick }
        if ($address($knick,2) == $gettok($readini($+($network,users.ini),$chan,$knick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$knick),2,32) == admin) { remini $+($network,users.ini) $chan $nick | invite $nick $chan | io | .msg $chan %logo.l $nick %logo.r You may not kick a channel admin. | .msg $chan %logo.l $nick %logo.r you are now being stripped of your %logo.l Op %logo.r status. | mode -o $nick }
        if ($address($knick,2) == $gettok($readini($+($network,users.ini),$chan,$knick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$knick),2,32) == owner) { remini $+($network,users.ini) $chan $nick | invite $nick $chan | io | .msg $chan %logo.l $nick %logo.r You may not kick a channel owner. | .msg $chan %logo.l $nick %logo.r you are now being stripped of your %logo.l Op %logo.r status. | mode -o $nick }
    } }
    /* 
    On Op/Deop Events 
    */
    on *:op:#: { 
      if ($($+(%,protect,$chan),2) == on) {
        if (%relay == on) && ($chan == %chan1) { .msg %chan2 Op %logo.l $opnick %logo.r by %logo.l $nick %logo.r } 
        if ($nick == $me) || ($nick == chanserv) || ($nick == Pazuzu) { halt }
        if ($address($opnick,2) == $gettok($readini($+($network,users.ini),$chan,$opnick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$opnick),2,32) == op) { halt }
        if ($address($opnick,2) == $gettok($readini($+($network,users.ini),$chan,$opnick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$opnick),2,32) == admin) { halt }
        if ($address($opnick,2) == $gettok($readini($+($network,users.ini),$chan,$opnick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$opnick),2,32) == owner) { halt }
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == admin) { halt }
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == owner) { halt }
        else { io | .msg $chan %logo.l $opnick %logo.r is not a %logo.l Op %logo.r in this channel. | mode $chan -o $opnick | .msg $chan %logo.l $nick %logo.r you are now being stripped of your %logo.l Op %logo.r status. | remini $+($network,users.ini) $chan $nick | mode $chan -o $nick }
    } }
    on *:deop:#: {
      if ($+(%,protect,$chan)) {
        if (%relay == on) && ($chan == %chan1) { .msg %chan2 DeOp %logo.l $opnick %logo.r by %logo.l $nick %logo.r } 
        if ($nick == $me) { halt }
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == admin) { halt }
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == owner) { halt }
        if ($address($opnick,2) == $gettok($readini($+($network,users.ini),$chan,$opnick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$opnick),2,32) == owner) { remini $+($network,users.ini) $chan $nick | io | .msg $chan You may not deop a channel owner, You are now being stripped of your Op status. | mode $chan +o $opnick | mode $chan -o $nick }
        if ($address($opnick,2) == $gettok($readini($+($network,users.ini),$chan,$opnick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$opnick),2,32) == admin) { remini $+($network,users.ini) $chan $nick | io | .msg $chan You may not deop a channel admin, You are now being stripped of your Op status. | mode $chan +o $opnick | mode $chan -o $nick }
        if ($address($opnick,2) == $gettok($readini($+($network,users.ini),$chan,$opnick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$opnick),2,32) == op) { remini $+($network,users.ini) $chan $nick | io | .msg $chan You may not deop a channel op, You are now being stripped of your Op status. | mode $chan +o $opnick | mode $chan -o $nick }
    } }
    /* 
    On Help/Dehelp Events 
    */
    on *:help:#: { 
      if ($+(%,protect,$chan)) {
        if (%relay == on) && ($chan == %chan1) { .msg %chan2 Help %logo.l $hnick %logo.r by %logo.l $nick %logo.r } 
        if ($nick == $me) || ($nick == chanserv) || ($nick == Pazuzu) { halt }
        if ($gettok($readini($+($network,users.ini),$chan,$hnick),2,32) == helper) || ($gettok($readini($+($network,users.ini),$chan,$hnick),2,32) == op) { halt }
        if ($gettok($readini($+($network,users.ini),$chan,$hnick),2,32) == admin) || ($gettok($readini($+($network,users.ini),$chan,$hnick),2,32) == owner) { halt }
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == op) { halt }
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == admin) { halt }
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == owner) { halt }
        if ($gettok($readini($+($network,users.ini),$chan,$hnick),2,32) != helper) { io | .msg $chan %logo.l $hnick %logo.r is not a %logo.l Helper %logo.r in this channel. | mode $chan -h $hnick | .msg $chan %logo.l $nick %logo.r you are now being stripped of your %logo.l Op %logo.r status. | remini $+($network,users.ini) $chan $nick | mode $chan -o $nick }
    } }
    on *:dehelp:#: {
      if ($+(%,protect,$chan)) {
        if (%relay == on) && ($chan == %chan1) { msg %chan2 DeHelp %logo.l $hnick %logo.r by %logo.l $nick %logo.r } 
        if ($nick == $me) { halt }
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == op) { halt }
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == admin) { halt }
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == owner) { halt }
        if ($address($hnick,2) == $gettok($readini($+($network,users.ini),$chan,$hnick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$hnick),2,32) == owner) { io | .msg $chan You may not dehelp a channel owner, You are now being stripped of your Op status. | mode $chan +h $hnick | remini $+($network,users.ini) $chan $nick | mode $chan -o $nick }
        if ($address($hnick,2) == $gettok($readini($+($network,users.ini),$chan,$hnick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$hnick),2,32) == admin) { io | .msg $chan You may not dehelp a channel admin, You are now being stripped of your Op status. | mode $chan +h $hnick | remini $+($network,users.ini) $chan $nick | mode $chan -o $nick }
        if ($address($hnick,2) == $gettok($readini($+($network,users.ini),$chan,$hnick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$hnick),2,32) == op) { io | .msg $chan You may not dehelp a channel op, You are now being stripped of your Op status. | mode $chan +h $hnick | remini $+($network,users.ini) $chan $nick | mode $chan -o $nick }
        if ($address($hnick,2) == $gettok($readini($+($network,users.ini),$chan,$hnick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$hnick),2,32) == helper) { io | .msg $chan You may not dehelp a channel helper, You are now being stripped of your Op status. | mode $chan +h $hnick | remini $+($network,users.ini) $chan $nick | mode $chan -o $nick }
    } }
    /* 
    On Voice/Devoice Events 
    */
    on *:voice:#: { 
      if ($+(%,protect,$chan)) {
        if (%relay == on) && ($chan == %chan1) { msg %chan2 Voice %logo.l $vnick %logo.r by %logo.l $nick %logo.r }
        if ($nick == $me) || ($nick == chanserv) || ($nick == Pazuzu) { halt } 
        if ($gettok($readini($+($network,users.ini),$chan,$vnick),2,32) == voice) || ($gettok($readini($+($network,users.ini),$chan,$vnick),2,32) == helper) || ($gettok($readini($+($network,users.ini),$chan,$vnick),2,32) == op) { halt }
        if ($gettok($readini($+($network,users.ini),$chan,$vnick),2,32) == admin) || ($gettok($readini($+($network,users.ini),$chan,$vnick),2,32) == owner) { halt }
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == helper) { halt }
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == op) { halt }
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == admin) { halt }
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == owner) { halt } 
        if ($gettok($readini($+($network,users.ini),$chan,$vnick),2,32) != voice) { io | .msg $chan %logo.l $vnick %logo.r is not a %logo.l Voice %logo.r in this channel. | mode $chan -v $vnick | .msg $chan %logo.l $nick %logo.r you are now being stripped of your %logo.l Op %logo.r status. | remini $+($network,users.ini) $chan $nick | mode $chan -o $nick }
    } }
    on *:devoice:#: {
      if ($+(%,protect,$chan)) {
        if (%relay == on) && ($chan == %chan1) { msg %chan2 DeVoice %logo.l $vnick %logo.r by %logo.l $nick %logo.r } 
        if ($nick == $me) { halt }
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == helper) { halt }
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == op) { halt }
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == admin) { halt }
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == owner) { halt }
        if ($address($vnick,2) == $gettok($readini($+($network,users.ini),$chan,$vnick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$vnick),2,32) == owner) { io | .msg $chan You may not devoice a channel owner, You are now being stripped of your Op status. | mode $chan +v $vnick | remini $+($network,users.ini) $chan $nick | mode $chan -o $nick }
        if ($address($vnick,2) == $gettok($readini($+($network,users.ini),$chan,$vnick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$vnick),2,32) == admin) { io | .msg $chan You may not devoice a channel admin, You are now being stripped of your Op status. | mode $chan +v $vnick | remini $+($network,users.ini) $chan $nick | mode $chan -o $nick }
        if ($address($vnick,2) == $gettok($readini($+($network,users.ini),$chan,$vnick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$vnick),2,32) == op) { io | .msg $chan You may not devoice a channel op, You are now being stripped of your Op status. | mode $chan +v $vnick | remini $+($network,users.ini) $chan $nick | mode $chan -o $nick }
        if ($address($vnick,2) == $gettok($readini($+($network,users.ini),$chan,$vnick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$vnick),2,32) == helper) { io | .msg $chan You may not devoice a channel helper, You are now being stripped of your Op status. | mode $chan +v $vnick | remini $+($network,users.ini) $chan $nick | mode $chan -o $nick }
        if ($address($vnick,2) == $gettok($readini($+($network,users.ini),$chan,$vnick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$vnick),2,32) == voice) { io | .msg $chan You may not devoice a channel voice, You are now being stripped of your Op status. | mode $chan +v $vnick | remini $+($network,users.ini) $chan $nick | mode $chan -o $nick }
    } }
    /* 
    On Notice Event 
    */
    on *:notice:*:*: {
      if ($me * is already in use* isin $strip($1-)) { .msg nickserv ghost %botnick %botpass }
      if (Ghost with your nick has been killed* isin $strip($1-)) { .nick %botnick | .identify %botpass }
      if (STATUS isin $strip($1-)) { 
        if (0 isin $strip($1-)) { .msg %targ %logo.l %targnick %logo.r No such user online, or not registered. }
        if (1 isin $strip($1-)) { .msg %targ %logo.l %targnick %logo.r User not recognised as nick owner. }
        if (2 isin $strip($1-)) { .msg %targ %logo.l %targnick %logo.r User recognised as nick owner via Access List only. }
        if (3 isin $strip($1-)) { .msg %targ %logo.l %targnick %logo.r User recognised as nick owner via Identify command. }
    } }
    
    /* 
    On Notify/UnNotify Events 
    */
    on 1:notify: { 
      set $+(%,ticks,$network,$nick) 0
      $+(.timer,ticks,$network,$nick) 0 1 inc $($+(%,ticks,$network,$nick),1) 1
    }
    on 1:unotify: { 
      echo -a $nick was online for: $duration($($+(%,ticks,$network,$nick),2))
      $+(.timer,ticks,$network,$nick) off
      set $+(%,tickstotal,$network,$nick) $calc($($+(%,tickstotal,$network,$nick),2) + $($+(%,ticks,$network,$nick),2))
    }
    /*
    Rawmode
    */
    on *:rawmode:%rchan: { 
      if (%serverrelay == on) { relayevent $network $nick sets mode $1 on $2 } 
    }
    /* 
    On Action Event 
    */
    on *:action:*:*: { 
      set $+(%,$nick,totalmsg) $calc($($+(%,$nick,totalmsg),2) + 1)
      set $+(%,$nick,totalchar) $calc($len($1-) + $($+(%,$nick,totalchar),2))
      set $+(%,$nick,totalword) $calc($numtok($1-,32) + $($+(%,$nick,totalword),2))
      if (%serverrelay == on) && ($chan == %rchan) { relayevent $network $+($chr(60),$nick) $1- }
      if (%relay == on) && ($chan == %chan1) { msg %chan2 %logo.l $nick %logo.r $1- } 
    }
    /* 
    On Text Event 
    */
    on *:text:*:*: {
      set $+(%,$nick,totalmsg) $calc($($+(%,$nick,totalmsg),2) + 1)
      set $+(%,$nick,totalchar) $calc($len($1-) + $($+(%,$nick,totalchar),2))
      set $+(%,$nick,totalword) $calc($numtok($1-,32) + $($+(%,$nick,totalword),2))
      if (%serverrelay == on) && ($chan == %rchan) { relayevent $network $+($chr(60),$nick,$chr(62)) $1- }
      ;
      ; Flood Catcher ( #:# Lines:Seconds )
      ;
      if ($($+(%,$chan,flood),2) == on) { 
        set -u $+ $+(%,$chan,floodin),2) $+(%,$nick,flood) 1 
        if ($($+(%,$nick,flood),2) >= $($+(%,$chan,floodlines),2)) { unset $+(%,$nick,flood) | ban -ku300 $chan $nick 2 Flooding. | .notice $nick You have been banned from %logo.l $chan %logo.r for Flooding. } 
      } 
      ;
      ; Flood Catcher ( Long Messages )
      ;
      if ($($+(%,$chan,bflood),2) == on) { 
        if ($len($strip($1-)) >= $($+(%,$chan,bigflood),2)) { ban -ku300 $chan $nick 2 Flooding. | .notice $nick You have been banned from %logo.l $chan %logo.r for Flooding. } 
      } 
      ;
      ; single server relay
      ;
      if (%relay == on) && ($chan == %chan1) { msg %chan2 %logo.l $nick %logo.r $1- } 
      if (!$read(info.txt, w,$1 $+ *)) { haltdef }
      if ($read(info.txt, w,$1 $+ *)) { if ($1) && (!$2) { .msg $chan $read(info.txt, w,$1 $+ *) } }
    
      if ($($+(%,trigger,$nick),2) == 3) {
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),botmaster,$nick),2,32)) { unset $+(%,trigger,$nick) }
        else { .msg $chan %logo.l $nick %logo.r You are being ignored for 5 minutes, for trigger abuse. | ignore -u300 $nick | halt }
      }
    
      ;
      ; Public Commands
      ;
      if ($+(%trigger,about) == $strip($1)) {
        .timer 1 1 .notice $nick %logo.l SassIRC 12,01m04,01I04,01R08,01C Channel Protection Bot %logo.r Coded By %logo.l PuNkTuReD %logo.r
        .timer 1 4 .notice $nick Is currently being used on %logo.l $hget(Servers,0).item %logo.r server(s) in a total of %logo.l $+(%,totchans),2) %logo.r Channel(s), Last Reboot: %logo.l $uptime(server,2) %logo.r ago.
        .timer 1 7 .notice $nick %logo.l $+(%trigger,commands) %logo.r to see a list of available commands. 
      }
      if ($+(%trigger,checknick) == $strip($1)) {
        if (!$2) { eis | .msg $chan ?checknick command: ?checknick nick }
        else { set -u10 %targ $chan | set -u10 %targnick $2 | .msg nickserv status $2 }
      }
      if ($+(%trigger,commands) == $strip($1)) {
        .notice $nick 04,01**** %logo.l Bot Master %logo.r commands are 04,01Red. %logo.l Channel Owner %logo.r commands are 07,01Orange. %logo.l Public %logo.r commands are 08,01Yellow.
        ; Bot Master Commands
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),botmaster,$nick),2,32)) {
          .notice $nick 04,01?act nick/channel message - 04,01?addowner nick channel - 04,01?autojoin add/del/list network channel - 04,01?botmaster nick - 04,01?clonescanner on/off - 04,01?cycle channel - 
          .notice $nick 04,01?global messsage - 04,01?kill - 04,01?reboot - 04,01?relay on/off channel_1 channel_2 - 04,01?remember info_here - 04,01?say nick/channel message - 04,01?set nick/password nick/password - 04,01?server add/del server - 
        }
        ; Channel Owner Commands
        if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == owner ) { 
          .notice $nick 07,01?addadmin nick - 07,01?addop nick - 07,01?addhelper nick - 07,01?addvoice nick - 07,01?badnick add/del nick - 07,01?ban add/del nick reason - 07,01?baninfo total/banmask - 
          .notice $nick 07,01?bigflood on/off/status # - 07,01?flood on/off/status #:# - 07,01?flyby on/off/status - 07,01?greet on/off message - 07,01?kick nick reason - 07,01?modelock list/modes - 07,01?protect on/off - 07,01?spam on/off/status - 07,01?topiclock on/off topic - 
        }
        ; Public Commands
        .notice $nick 08,01?about - 08,01?checknick nick - 08,01?commands - 08,01?dns nick/address - 08,01?ircop scan channel - 08,01?lastseen nick - 08,01?stats nick - 08,01?rules -
      }
      if ($+(%trigger,dns) == $strip($1)) {
        if (!$2) { eis | .msg $chan ?dns command: ?dns address }
        if ($2) { set -u5 %targ $chan | .dns $2 }
      }
      if ($+(%trigger,ircop) == $strip($1)) {
        if (!$3) { eis | .msg $chan ?ircop command: ?ircop scan #channel }
        if ($2 == scan) { 
          if ($me ison $3) { set -u10 %msgchan $chan | set -u10 %chkchan1 $3 | ircopscan %chkchan1 }
          else { .msg $chan %logo.l $nick %logo.r I can only scan channels i am on. }
      } }
      if ($+(%trigger,lastseen) == $strip($1)) {
        if (!$2) { eis | .msg $chan ?lastseen command: ?lastseen nick | halt }
        if ($2) { 
          if ($2 ison $chan) { .msg $chan %logo.l Last Seen04,01 $2 %logo.r is on %logo.l $chan %logo.r already %logo.l $nick %logo.r }
          else {
            if ($2 == $gettok($read(lastseen.txt, w,* $+ $2- $+ *),2,32)) { .msg $chan %logo.l Last Seen04,01 $2 %logo.r $read(lastseen.txt, w,* $+ $2- $+ *) } 
            else { .msg $chan %logo.l Last Seen %logo.r I have No Records for $2  }
          }
      } }
      if ($+(%trigger,rules) == $strip($1)) {
        .timer 1 1 .msg $chan $iif($($+(%,protect,$chan),2) == on,$(%logo.l  Channel is being protected %logo.r ),) $iif($($+(%,protect,$chan),2) == on,Status protection (@ % +,Op Hop Voice) ,)
        .timer 1 4 .msg $chan $iif($chan == $gettok($readini(users.ini,modelock,$chan),1,32),$(%logo.l  Mode Lock %logo.r ),) $iif($chan == $gettok($readini(users.ini,modelock,$chan),1,32), $gettok($readini(users.ini,modelock,$chan),2-,32) ,)
        .timer 1 7 .msg $chan $iif($($+(%,topiclock,$chan),2) == on,$(%logo.l  Topic lock %logo.r ),) $iif($($+(%,topiclock,$chan),2) == on,$($+(%,topic,$chan),2) ,)
        .timer 1 10 .msg $chan $iif($($+(%,greet,$chan),2) == on,$(%logo.l  Greet Message %logo.r ),) $iif($($+(%,greet,$chan),2) == on,$($+(%,joingreet,$chan),2) ,)
        .timer 1 13 .msg $chan $iif($($+(%,sp,$chan),2) == on,$(%logo.l  Spam Protect %logo.r ),) $iif($($+(%,$chan,flyby),2) == on,$(%logo.l  Fly-By Protect %logo.r ),) $iif($($+(%,$chan,flood),2) == on,$(%logo.l  Flood Protect %logo.r ),) $iif($($+(%,$chan,bflood),2) == on,$(%logo.l  Big Flood Protect %logo.r ),)
      }
      if ($+(%trigger,stats) == $strip($1)) {
        if (!$2) { eis | .msg $chan ?stats command: ?stats nick | .msg $chan Or: ?stats reset nick | halt }
        if ($2) { 
          if ($2 == reset) && ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),botmaster,$nick),2,32)) { unset $+(%,$3,*) | .msg $chan %logo.l Stats for04,01 $3 %logo.r Have Been Reset. | halt }
          else {
            if ($($+(%,$2,totaljoin),2)) {
              if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),botmaster,$nick),2,32)) {
                .msg $chan %logo.l Stats for04,01 $2 %logo.r Total Joins: %logo.l $iif($($+(%,$2,totaljoin),2),$($+(%,$2,totaljoin),2),0) %logo.r Total Parts: %logo.l $iif($($+(%,$2,totalparts),2),$($+(%,$2,totalparts),2),0) %logo.r Total Quits: %logo.l $iif($($+(%,$2,totalquits),2),$($+(%,$2,totalquits),2),0) %logo.r Total Bans: %logo.l $iif($($+(%,$2,totalbans),2),$($+(%,$2,totalbans),2),0) %logo.r Total Kicks: %logo.l $iif($($+(%,$2,totalkicks),2),$($+(%,$2,totalkicks),2),0) %logo.r Total Messages Sent: %logo.l $iif($($+(%,$2,totalmsg),2),$($+(%,$2,totalmsg),2),0) %logo.r Total Letters: %logo.l $iif($($+(%,$2,totalchar),2),$($+(%,$2,totalchar),2),0) %logo.r Total Words: %logo.l $iif($($+(%,$2,totalword),2),$($+(%,$2,totalword),2),0) %logo.r Total Online Time %logo.l $duration($calc($($+(%,ticks,$network,$2),2) + $($+(%,tickstotal,$network,$2),2)))  %logo.r 
                halt
              }
              if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == owner) {
                .msg $chan %logo.l Stats for04,01 $2 %logo.r Total Joins: %logo.l $iif($($+(%,$2,totaljoin),2),$($+(%,$2,totaljoin),2),0) %logo.r Total Parts: %logo.l $iif($($+(%,$2,totalparts),2),$($+(%,$2,totalparts),2),0) %logo.r Total Quits: %logo.l $iif($($+(%,$2,totalquits),2),$($+(%,$2,totalquits),2),0) %logo.r Total Bans: %logo.l $iif($($+(%,$2,totalbans),2),$($+(%,$2,totalbans),2),0) %logo.r Total Kicks: %logo.l $iif($($+(%,$2,totalkicks),2),$($+(%,$2,totalkicks),2),0) %logo.r Total Messages Sent: %logo.l $iif($($+(%,$2,totalmsg),2),$($+(%,$2,totalmsg),2),0) %logo.r Total Letters: %logo.l $iif($($+(%,$2,totalchar),2),$($+(%,$2,totalchar),2),0) %logo.r Total Words: %logo.l $iif($($+(%,$2,totalword),2),$($+(%,$2,totalword),2),0) %logo.r Total Online Time %logo.l $duration($calc($($+(%,ticks,$network,$2),2) + $($+(%,tickstotal,$network,$2),2)))  %logo.r
                halt
              }
              if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == admin) { 
                .msg $chan %logo.l Stats for04,01 $2 %logo.r Total Joins: %logo.l $iif($($+(%,$2,totaljoin),2),$($+(%,$2,totaljoin),2),0) %logo.r Total Parts: %logo.l $iif($($+(%,$2,totalparts),2),$($+(%,$2,totalparts),2),0) %logo.r Total Quits: %logo.l $iif($($+(%,$2,totalquits),2),$($+(%,$2,totalquits),2),0) %logo.r Total Bans: %logo.l $iif($($+(%,$2,totalbans),2),$($+(%,$2,totalbans),2),0) %logo.r Total Kicks: %logo.l $iif($($+(%,$2,totalkicks),2),$($+(%,$2,totalkicks),2),0) %logo.r Total Messages Sent: %logo.l $iif($($+(%,$2,totalmsg),2),$($+(%,$2,totalmsg),2),0) %logo.r Total Letters: %logo.l $iif($($+(%,$2,totalchar),2),$($+(%,$2,totalchar),2),0) %logo.r Total Words: %logo.l $iif($($+(%,$2,totalword),2),$($+(%,$2,totalword),2),0) %logo.r Total Online Time %logo.l $duration($calc($($+(%,ticks,$network,$2),2) + $($+(%,tickstotal,$network,$2),2)))  %logo.r
                halt
              }
              if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == op) {
                .msg $chan %logo.l Stats for04,01 $2 %logo.r Total Joins: %logo.l $iif($($+(%,$2,totaljoin),2),$($+(%,$2,totaljoin),2),0) %logo.r Total Parts: %logo.l $iif($($+(%,$2,totalparts),2),$($+(%,$2,totalparts),2),0) %logo.r Total Quits: %logo.l $iif($($+(%,$2,totalquits),2),$($+(%,$2,totalquits),2),0) %logo.r Total Bans: %logo.l $iif($($+(%,$2,totalbans),2),$($+(%,$2,totalbans),2),0) %logo.r Total Kicks: %logo.l $iif($($+(%,$2,totalkicks),2),$($+(%,$2,totalkicks),2),0) %logo.r Total Messages Sent: %logo.l $iif($($+(%,$2,totalmsg),2),$($+(%,$2,totalmsg),2),0) %logo.r Total Letters: %logo.l $iif($($+(%,$2,totalchar),2),$($+(%,$2,totalchar),2),0) %logo.r Total Words: %logo.l $iif($($+(%,$2,totalword),2),$($+(%,$2,totalword),2),0) %logo.r Total Online Time %logo.l $duration($calc($($+(%,ticks,$network,$2),2) + $($+(%,tickstotal,$network,$2),2)))  %logo.r
                halt
              }
              if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == helper) {
                .msg $chan %logo.l Stats for04,01 $2 %logo.r Total Joins: %logo.l $iif($($+(%,$2,totaljoin),2),$($+(%,$2,totaljoin),2),0) %logo.r Total Parts: %logo.l $iif($($+(%,$2,totalparts),2),$($+(%,$2,totalparts),2),0) %logo.r Total Quits: %logo.l $iif($($+(%,$2,totalquits),2),$($+(%,$2,totalquits),2),0) %logo.r Total Bans: %logo.l $iif($($+(%,$2,totalbans),2),$($+(%,$2,totalbans),2),0) %logo.r Total Kicks: %logo.l $iif($($+(%,$2,totalkicks),2),$($+(%,$2,totalkicks),2),0) %logo.r Total Messages Sent: %logo.l $iif($($+(%,$2,totalmsg),2),$($+(%,$2,totalmsg),2),0) %logo.r Total Letters: %logo.l $iif($($+(%,$2,totalchar),2),$($+(%,$2,totalchar),2),0) %logo.r Total Words: %logo.l $iif($($+(%,$2,totalword),2),$($+(%,$2,totalword),2),0) %logo.r Total Online Time %logo.l $duration($calc($($+(%,ticks,$network,$2),2) + $($+(%,tickstotal,$network,$2),2)))  %logo.r
                halt
              }
              else { .msg $chan %logo.l Stats for04,01 $2 %logo.r Total Joins: %logo.l $iif($($+(%,$2,totaljoin),2),$($+(%,$2,totaljoin),2),0) %logo.r Total Parts: %logo.l $iif($($+(%,$2,totalparts),2),$($+(%,$2,totalparts),2),0) %logo.r Total Quits: %logo.l $iif($($+(%,$2,totalquits),2),$($+(%,$2,totalquits),2),0) %logo.r Total Bans: %logo.l $iif($($+(%,$2,totalbans),2),$($+(%,$2,totalbans),2),0) %logo.r Total Kicks: %logo.l $iif($($+(%,$2,totalkicks),2),$($+(%,$2,totalkicks),2),0) %logo.r Total Messages Sent: %logo.l $iif($($+(%,$2,totalmsg),2),$($+(%,$2,totalmsg),2),0) %logo.r Total Letters: %logo.l $iif($($+(%,$2,totalchar),2),$($+(%,$2,totalchar),2),0) %logo.r Total Words: %logo.l $iif($($+(%,$2,totalword),2),$($+(%,$2,totalword),2),0) %logo.r }
            }
            else { .msg $chan %logo.l Stats for04,01 $2 %logo.r No stats Recorded. } 
          } 
      } }
      ;
      ; Bot Master Commands
      ;
      if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),botmaster,$nick),2,32)) {
        if ($+(%trigger,act) == $strip($1)) {
          if (!$3) { eis | .msg $chan ?act command: ?act nick/#channel message }
          if ($3) { .describe $chan %logo.l $me %logo.r $3- | .describe $2 $3- }
        }
        if ($+(%trigger,addowner) == $strip($1)) {
          if (!$3) { eis | .msg $chan ?addowner command: ?addowner nick #channel }
          if ($3) { notify $2 | writeini $+($network,users.ini) $3 $2 $address($2,2) owner | .msg $chan Added %logo.l $2 %logo.r as %logo.l $3 %logo.r Owner. }
        }
        if ($+(%trigger,autojoin) == $strip($1)) {
          if (!$2) { eis | .msg $chan ?autojoin command: ?autojoin add/del/list network #channel }
          if ($2 == add) { $iif(%totchans == $null,set %totchans 1,set %totchans $calc(%totchans + 1)) | hadd -m AutoJoin $3 $iif($hget(Autojoin,$3),$+($hget(Autojoin,$3),$chr(44),$4-),$+($4-,$chr(44))) | .msg $chan Added %logo.l $4 %logo.r to %logo.l $3 %logo.r Autojoin channel(s), I will join on my next reboot. }
          if ($2 == del) { 
            set %totchans $calc(%totchans - 1)
            hadd AutoJoin $3 $remtok($hget(Autojoin,$3),$4-,1,44) 
            .msg $chan Deleted %logo.l $4 %logo.r from %logo.l $3 %logo.r Autojoin channel(s), I will leave on my next reboot. 
          }
          if ($2 == list) { 
            if (!$3) { eis | .msg $chan ?autojoin command: ?autojoin list network }
            else { .msg $chan I auto join these channel(s) on $+($3,:) %logo.l $hget(Autojoin,$3) %logo.r }
        } }
        if ($+(%trigger,badnick) == $strip($1)) {
          if (!$4) { eis | .msg $chan ?badnick command: ?badnick add/del nick | halt }
          if ($2 == add) { writeini badnicks.ini $chan $3 $3 | .msg $chan %logo.l Bad Nick04,01 $3 %logo.r Added to bad nicks list for %logo.l $chan %logo.r | halt }
          if ($2 == del) { remini badnicks.ini $chan $3 | .msg $chan %logo.l Bad Nick04,01 $3 %logo.r Removed from bad nicks list for %logo.l $chan %logo.r | halt }
        }
        if ($+(%trigger,baninfo) == $strip($1)) {
          if (!$2) { eis | .msg $chan ?baninfo command: ?baninfo total/banmask | halt } 
          if ($2 == total) { .msg $chan %logo.l Total Bans %logo.r $lines(banned.txt) | halt }
          if (!$read(banned.txt, w, * $+ $2- $+ *)) { .msg $chan No Such Ban Exists. | halt }
          else { .msg $chan $read(banned.txt, w, * $+ $2- $+ *) | halt }
        }
        if ($+(%trigger,botmaster) == $strip($1)) {
          if (!$2) { eis | .msg $chan ?botmaster command: ?botmaster nick | halt } 
          if ($2) { notify $2 | writeini $+($network,users.ini) botmaster $2 $2 $address($2,2) | .msg $chan %logo.l $gettok($readini(users.ini,botmaster,$2),1,32) %logo.r  added to %logo.l Master List %logo.r }
        }
        if ($+(%trigger,clonescanner) == $strip($1)) {
          if (!$2) { eis | .msg $chan ?clonescanner command: ?clonescanner on/off }
          if ($2 == on) { set %clonescanner on | .msg $chan %logo.l Clone Scanner %logo.r On }
          if ($2 == off) { set %clonescanner off | .msg $chan %logo.l Clone Scanner %logo.r Off }
        }
        if ($+(%trigger,cycle) == $strip($1)) {
          if (!$2) { eis | .msg $chan ?cycle command: ?cycle #channel }
          if ($2) { .msg $2 %logo.l Cycling %logo.r as ordered by %logo.l $nick 04,01%logo.r | part $2 | .timer 1 1 join $2 } 
        }
        if ($+(%trigger,forget) == $strip($1)) { write $+(-ds,",$2-,") info.txt | msg $chan ok ill forget that. }
        if ($+(%trigger,global) == $strip($1)) {
          if (!$2) { eis | .msg $chan ?global command: ?global message }
          if ($2) { Global $nick $2- }
        } 
        if ($+(%trigger,kill) == $strip($1)) { scon -a //ame %logo.l Killed %logo.r by %logo.l $nick %logo.r | exit -n }
        if ($+(%trigger,openini) == $strip($1)) { run $mircdirusers.ini }
        if ($+(%trigger,openmircdir) == $strip($1)) { run $mircdir }
        if ($+(%trigger,raw) == $strip($1)) {
          if (!$2) { eis | .msg $chan ?raw command: ?raw command }
          if ($2) { $2- }
        }
        if ($+(%trigger,reboot) == $strip($1)) { scon -a //ame %logo.l Rebooting %logo.r as ordered by %logo.l $nick %logo.r command recieved on %logo.l $network %logo.r | exit -nr }
        if ($+(%trigger,relay) == $strip($1)) {
          if (!$2) { eis | .msg $chan ?relay command: ?relay channel_1 channel_2 }
          if (on == $2) { join $3 | set %chan1 $3 | set %chan2 $4 | set %relay on | msg $chan %logo.l Relay %logo.r from %logo.l $3 %logo.r to %logo.l $4 %logo.r }
          if (off == $2) { part %chan1 | unset %chan1 %chan2 %relay | msg $chan %logo.l Relay %logo.r OFF  }
        }
        if ($+(%trigger,remember) == $strip($1)) { 
          if (!$2) { eis | .msg $chan ?remember command: ?remember info_here }
          if (!$read(info.txt, w, $2 *)) && ($2) { write info.txt $2- | .msg $chan Ok, $nick $+ . | halt }
          if ($read(info.txt, w, $2 *)) && ($2) { write -dw $+ $2 $+ * info.txt | write info.txt $2- | .msg $chan Ok, $nick $+ . Replaced previous info. | halt }
        }
        if ($+(%trigger,say) == $strip($1)) {
          if (!$3) { eis | .msg $chan ?say command: ?say nick/#channel message }
          if ($3) { .msg $chan %logo.l $me %logo.r $3- | .msg $2 $3- }
        }
        if ($+(%trigger,server) == $strip($1)) {
          if (!$2) { eis | .msg $chan ?server command: ?server add/del server }
          if ($2 == add) { hadd -m Servers $3- $3- | .msg $chan Added %logo.l $3 %logo.r as %logo.l Autojoin Server %logo.r }
          if ($2 == del) { hdel -m Servers $3- $3- | .msg $chan Deleted %logo.l $3 %logo.r as %logo.l Autojoin Server %logo.r }
        }
        if ($+(%trigger,set) == $strip($1)) {
          if (!$3) { eis | .msg $chan ?set command: ?set nick/password nick/password }
          if ($2 == nick) { set %botnick $3 | nick $3 | identify %botpass | .notice $nick Set %logo.l $3 %logo.r as %logo.l BotNick %logo.r }
          if ($2 == password) { set %botpass $3 | identify $3 | .notice $nick Set %logo.l $3 %logo.r as %logo.l Password %logo.r }
        }
        if ($+(%trigger,trigger) == $strip($1)) { 
          if ($2) { set %trigger $2 | msg $chan Trigger is now %logo.l $2- %logo.r }
      } }
      ;
      ; Channel Owner Commands
      ;
      if ($strip($address($nick,2)) == $gettok($readini($+($network,users.ini),$chan,$nick),1,32)) && ($gettok($readini($+($network,users.ini),$chan,$nick),2,32) == owner ) {
        if ($+(%trigger,addadmin) == $strip($1)) {
          if (!$2) { eis | .msg $chan ?addadmin command: ?addadmin nick }
          if ($2) { notify $2 | writeini $+($network,users.ini) $chan $2 $address($2,2) admin | mode $chan +a $2 | .msg $chan Added %logo.l $2 %logo.r as %logo.l $chan %logo.r Admin. }
        }
        if ($+(%trigger,addhelper) == $strip($1)) {
          if (!$2) { eis | .msg $chan ?addhelper command: ?addhelper nick  }
          if ($2) { notify $2 | writeini $+($network,users.ini) $chan $2 $address($2,2) helper | mode $chan +h $2 | .msg $chan Added %logo.l $2 %logo.r as %logo.l $chan %logo.r Helper. }
        }
        if ($+(%trigger,addop) == $strip($1)) {
          if (!$2) { eis | .msg $chan ?addop command: ?addop nick }
          if ($2) { notify $2 | writeini $+($network,users.ini) $chan $2 $address($2,2) op | mode $chan +o $2 | .msg $chan Added %logo.l $2 %logo.r as %logo.l $chan %logo.r Op. }
        }
        if ($+(%trigger,addvoice) == $strip($1)) { 
          if (!$2) { eis | .msg $chan ?addvoice command: ?addvoice nick }
          if ($2) { notify $2 | writeini $+($network,users.ini) $chan $2 $address($2,2) voice | mode $chan +v $2 | .msg $chan Added %logo.l $2 %logo.r as %logo.l $chan %logo.r Voice. }
        }
        if ($+(%trigger,badnick) == $strip($1)) {
          if (!$4) { eis | .msg $chan ?badnick command: ?badnick add/del nick }
          if ($2 == add) { writeini badnicks.ini $chan $3 $3 | .msg $chan %logo.l Bad Nick $3 %logo.r Added to bad nicks list for %logo.l $chan %logo.r }
          if ($2 == del) { remini badnicks.ini $chan $3 | .msg $chan %logo.l Bad Nick $3 %logo.r Removed from bad nicks list for %logo.l $chan %logo.r }
        }
        if ($+(%trigger,ban) == $strip($1)) {
          if (!$3) { eis | .msg $chan ?ban command: ?ban add/del nick reason }
          if ($2 == add) { ban -ku600 $chan $3 $4- | .msg $chan Banned %logo.l $3 %logo.r time %logo.l 15 Minute Ban %logo.r reason %logo.l $4- %logo.r }
          if ($2 == del) { mode $chan -b $gettok($read(banned.txt, w, * $+ $3- $+ *),6,32) | .msg $chan Unbanned %logo.l $3 %logo.r }
        }
        if ($+(%trigger,baninfo) == $strip($1)) {
          if (!$2) { eis | .msg $chan ?baninfo command: ?baninfo total/banmask | halt } 
          if ($2 == total) { .msg $chan %logo.l Total Bans %logo.r $lines(banned.txt) | halt }
          if (!$read(banned.txt, w, * $+ $2- $+ *)) { .msg $chan No Such Ban Exists. | halt }
          else { .msg $chan $read(banned.txt, w, * $+ $2- $+ *) | halt }
        }
        if ($+(%trigger,bigflood) == $strip($1)) {
          if (!$2) { eis | .msg $chan ?bigflood command: ?bigflood on/off/status $chr(35) | .msg $chan example: ?flood on 200 ( 200 characters per message sent ) }
          if ($2 == on) { 
            set $+(%,$chan,bflood) on 
            set $+(%,$chan,bigflood) $3 
            .msg $chan %logo.l $chan Big Flood Protect %logo.r is now On: $3
          }
          if ($2 == off) { set $+(%,$chan,bflood) off | .msg $chan %logo.l $chan Big Flood Protect %logo.r is now Off }
          if ($strip($2) == status) { .msg $chan %logo.l $chan Big Flood Protect %logo.r is currently: $($+(%,$chan,bflood),2) }
        }
        if ($+(%trigger,flood) == $strip($1)) {
          if (!$2) { eis | .msg $chan ?flood command: ?flood on/off/status #:# | .msg $chan example: ?flood on 10:3 ( 10 messages in 3 seconds ) }
          if ($2 == on) { 
            set $+(%,$chan,floodlines) $gettok($3,1,58)
            set $+(%,$chan,floodin) $gettok($3,2,58)
            set $+(%,$chan,flood) on 
            .msg $chan %logo.l $chan Flood Protect %logo.r is now On: $3
          }
          if ($2 == off) { set $+(%,$chan,flood) off | .msg $chan %logo.l $chan Flood Protect %logo.r is now Off }
          if ($strip($2) == status) { .msg $chan %logo.l $chan Flood Protect %logo.r is currently: $($+(%,$chan,flood),2) }
        }
        if ($+(%trigger,flyby) == $strip($1)) {
          if (!$2) { eis | .msg $chan ?flyby command: ?flyby on/off/status | halt } 
          if ($2 == on) { set $+(%,$chan,flyby) on | .msg $chan %logo.l $chan Fly By %logo.r is now On }
          if ($2 == off) { set $+(%,$chan,flyby) off | .msg $chan %logo.l $chan Fly By %logo.r is now Off }
          if ($strip($2) == status) { .msg $chan %logo.l $chan Fly By %logo.r is currently $($+(%,$chan,flyby),2) }
        }
        if ($+(%trigger,greet) == $strip($1)) {
          if (!$2) { eis | .msg $chan ?greet command: ?greet on/off message }
          if ($2 == on) { set $+(%,greet,$chan) on | set $+(%,joingreet,$chan) $3- | .msg $chan Added %logo.l $3- %logo.r as %logo.l $chan %logo.r auto greet message. }
          if ($2 == off) { unset $+(%,greet,$chan) | .msg $chan Removed %logo.l $($+(%,joingreet,$chan),2) %logo.r as %logo.l $chan %logo.r auto greet message.  }
        }
        if ($+(%trigger,kick) == $strip($1)) {
          if (!$3) { eis | .msg $chan ?kick command: ?kick nick reason }
          if ($3) { kick $chan $2 $3- | .msg $chan Kicked %logo.l $2 %logo.r from %logo.l $3 %logo.r }
        }
        if ($+(%trigger,modelock) == $strip($1)) {
          if (!$2) { eis | .msg $chan ?modelock command: ?modelock list/modes }
          if ($2 == list) { .msg $chan %logo.l Enforcing Modes %logo.r for %logo.l $chan %logo.r $gettok($readini(users.ini,modelock,$chan),2-,32) | halt }
          else { writeini users.ini modelock $chan $chan $2- | mode $chan $2- | .msg $chan Mode %logo.l $2- %logo.r added to %logo.l $chan %logo.r }
        } 
        if ($+(%trigger,protect) == $strip($1)) {
          if (!$2) { eis | .msg $chan ?protect command: ?protect on/off }
          if ($2 == on) { set $+(%,protect,$chan) on | .msg $chan %logo.l $chan Protection %logo.r is now On }
          if ($2 == off) { unset $+(%,protect,$chan) | .msg $chan %logo.l $chan Protection %logo.r is now Off }
        } 
        if ($+(%trigger,remuser) == $strip($1)) {
          if (!$3) { eis | .msg $chan ?remuser command: ?remuser nick chan }
          else { remini $+($network,users.ini) $3 $2 | mode $3 -aohv $2 $2 $2 $2 | .msg $chan %logo.l $2 %logo.r removed from %logo.l $3 %logo.r access. }
        }
        if ($+(%trigger,spam) == $strip($1)) { 
          if (!$2) { eis | .msg $chan ?spam command: ?spam on/off/status }
          if ($regex($strip($1-),/on|off/i)) { set $+(%,sp,$chan) $2 | .msg $chan %logo.l $chan Spam Protect %logo.r is now $($+(%,sp,$chan),2) $+ . }
          if ($strip($2) == status) { .msg $chan %logo.l $chan Spam Protect %logo.r is currently: $($+(%,sp,$chan),2) }
        } 
        if ($+(%trigger,topiclock) == $strip($1)) {
          if (!$2) { eis | .msg $chan ?topiclock command: ?topiclock on/off topic }
          if ($2 == on) {
            if (!$3) { eis | .msg $chan ?topiclock command: ?topiclock on/off topic }
            else { set $+(%,topic,$chan) $3- | set $+(%,topiclock,$chan) on | topic $chan $3- | .msg $chan %logo.l $chan Topiclock %logo.r On }
          }
          if ($2 == off) { unset $+(%,topiclock,$chan) | .msg $chan %logo.l $chan Topiclock %logo.r Off | halt }
      } }
      ;
      ; Bot Talk
      ;
      if ($me == $strip($1)) && ($right($strip($1-),1) == ?) { 
        if (are you a bot isin $strip($1-)) { .msg $chan Of course I am! }
        if (annoying you isin $strip($1-)) { .msg $chan Most definitly $+($nick,!) Make them stop! | halt }
        set -u5 %randadv $rand(1,8)
        if (%randadv == 1) { .msg $chan What, You cant make decisions for yourself? }  
        if (%randadv == 2) { .msg $chan I wouldn't tell you if i knew. }  
        if (%randadv == 3) { .msg $chan Ask someone who cares. }  
        if (%randadv == 4) { .msg $chan I cant believe you just asked that!!! }  
        if (%randadv == 5) { .msg $chan Come back when Im not so drunk. }  
        if (%randadv == 6) { .msg $chan What sort of question is that? } 
        if (%randadv == 7) { .msg $chan Are you serious? }
        if (%randadv == 8) { .msg $chan You shouldn't be asking questions like that!! }
      } 
      ;
      ; Trigger flood 
      ;
      if ($left($1,1) == $($+(%,trigger),2)) { inc -u10 $+(%,trigger,$nick) } 
      ;
      ; Spam Catcher
      ;
      if ($regex($strip($1-),/\b(?:http|www|com|org|net)\b/i)) && ($($+(%,sp,$chan),2) == on) { 
        if ($+(%,spam,$nick) == $null) { set $+(%,spam,$nick) 1 }
        else { inc $+(%,spam,$nick) 1 }
        if ($($+(%,spam,$nick),2) == 3) { unset $+(%,spam,$nick) | ban -ku300 $chan $nick 2 Spam/Advertising. | .notice $nick You have been banned from %logo.l $chan %logo.r for Spam/Advertising. }
        .msg $chan %logo.l $nick %logo.r Spamming is not allowed in this channel.
      } 
    }
    /* 
    Aliases 
    */
    alias addowner { notify $1 | writeini $+($network,users.ini) botmaster $1 $1 $address($1,2) | .msg $chan %logo.l $gettok($readini($+($network,users.ini),botmaster,$1),1,32) %logo.r  added to %logo.l Master List %logo.r }
    alias eis { .msg $chan **** %logo.lIncorrect Syntax %logo.r ***** }
    alias io { .msg $chan **** %logo.lIllegal Operation %logo.r ***** }
    alias ircopscan { 
      if ($nick($1,0) > 1000) { .msg %chkchan %logo.l IRCop Scan %logo.r halted - too many users on channel. } 
      else { .who $1 | set $+(%,ircopcheck,$1) 1 }  
    } 
    alias chkflyby {
      var %a = 1
      var %b = $comchan($nick,0) 
      while %a <= %b { 
        if ($($+(%,join,$comchan($nick,%a),$nick),2) == $nick) { $iif($+(%,flyby,$comchan($nick,%a)),inc $+(%,flyby,$comchan($nick,%a)),set $+(%,flyby,$comchan($nick,%a)) 1) | ban -u300 $comchan($nick,%a) $nick 2 Fly-By Protect | .msg $comchan($nick,%a) %logo.l $($+(%,join,$comchan($nick,%a),$nick),2) %logo.r was Fly-By %logo.l $($+(%,flyby,$comchan($nick,%a)),2) %logo.r Since $($+(%,botstartdate),2) | halt }
        else { inc %a } 
    } }
    alias relayevent {
      var %a = $scon(0)
      while (%a) {
        if ($scon(%a).network == $1) { dec %a }
        else { scon %a msg %rchan $2- | dec %a }
    } } 
    alias global {
      scon -a //ame %logo.l Global Service Message %logo.r from %logo.l $m1 %logo.r on %logo.l $network %logo.r
      scon -a //ame %logo.l $1 %logo.r $2-
    }
    /* 
    Raw Events 
    */
    raw 315:*: { 
      if ($($+(%,ircopcheck,%chkchan1),2) != $null) { 
        if ($($+(%,ircops,%chkchan1),2) != $null) { .msg %msgchan %logo.l IRCops %logo.r on %chkchan1 $+ : $($+(%,ircops,%chkchan1),2) $+ . } 
        else { .msg %msgchan %logo.l IRCop Scan %logo.r No IRCops on %chkchan1 $+ . }
        unset %ircop* | .haltdef 
    } }
    raw 352:*: { 
      if ($($+(%,ircopcheck,%chkchan1),2) != $null) { 
        if (* isin $7) { set $+(%,ircops,%chkchan1) $($+(%,ircops,%chkchan1),2) $6 } 
        .haltdef 
    } } 
    /*
    Menu
    */
    menu channel,nicklist {
      Server relay
      .Set Relay Channel:set %rchan $$?"Channel name: example: #Help"
      .Relay Currently %serverrelay:set %serverrelay $iif((%serverrelay == on),off,on) | echo -a ***** Sever Relay is now %serverrelay 
      Add/Delete channel access
      .Add $$1 as owner:writeini $+($network,users.ini) $chan $address($$1,2) OWNER | mode $chan +q $$1 | .msg $chan Added %logo.l $$1 %logo.r as %logo.l $chan %logo.r Owner.
      .Add $$1 as admin:writeini $+($network,users.ini) $chan $address($$1,2) ADMIN | mode $chan +a $$1 | .msg $chan Added %logo.l $$1 %logo.r as %logo.l $chan %logo.r Admin.
      .Add $$1 as op:writeini $+($network,users.ini) $chan $address($$1,2) OP | mode $chan +o $$1 | .msg $chan Added %logo.l $$1 %logo.r as %logo.l $chan %logo.r Op.
      .Add $$1 as helper:writeini $+($network,users.ini) $chan $address($$1,2) HELPER | mode $chan +h $$1 | .msg $chan Added %logo.l $$1 %logo.r as %logo.l $chan %logo.r Helper.
      .Add $$1 as voice:writeini $+($network,users.ini) $chan $address($$1,2) VOICE | mode $chan +v $$1 | .msg $chan Added %logo.l $$1 %logo.r as %logo.l $chan %logo.r Voice.
      .Delete $$1:remini $+($network,users.ini) $chan $$1
      Global Message:global $$?"Message From" $$?"Message"
      Logo
      .Logo Left: set %logo.l $$?""
      .Logo Right: set %logo.r $$?""
    }
  6. met dit script heb je een klein overzicht van wat er gebeurt in je kanaal.

    je kan zien wie er voice/devoice/halfop/dehalfop/op/deop/owner/deowner krijgt in de kanalen waar je online bent

    je kan ook zien wie er een kick/ban/unban zet of krijgt

    je krijgt ook alle notice Berichten in een apart venster als je die heeft geactiveert

    dit Commando werkt uitendelijk ook met een on off modus
    dus als je deze wilt gebruiken zal je het moeten activeren als je niet wilt gebruiken dan moet je het desactiveren,
    je kan zelfs kiezen wat er aan of uit staat

    als de bepaalde funktie gedesactiveerd is, dan zal je er geen melding krijgen in een apart venster

    als de funktie geactiveerd is dan zal de window meteen mee opstarten bij het opstarten van uw mIRC in een aparte venster

    ik wens jullie alvast veel plezier met dit script!

     

    ;=====================================================
    ; ChatToIRC
    ; DIVERSE ZAKEN VOOR ChatToIRC
    ;=====================================================
    ;=====================================================
    ; Auteur: JamesBond
    ; Homepagina: https://chatplezier.com
    ; Netwerk: ChatPlezier
    ; Server: irc.chatplezier.com
    ; Email: jamesbond@chatplezier.com
    ;=====================================================
    
    alias ChatToIRC-Ops { dialog -dm ChatToIRC-ops ChatToIRC-ops }
    
    dialog ChatToIRC-Ops {
      title "  ChatToIRC Ops Menu"
      size -1 -1 140 90
      icon $icodir(emoticon.ico), 0 noborder
      option dbu
      tab "Notices", 1, 2 1 135 85 
      tab "Channels", 2
      tab "Kicks/Bans", 3
      tab "Clones", 4 
      button " Aanzetten", 7, 30 20 70 10,tab1 
      button " Uitzetten", 8, 30 40 70 10,tab1
      button " Aanzetten", 9, 30 20 70 10,tab2
      button " Uitzetten", 10, 30 40 70 10,tab2
      button " Aanzetten", 11, 30 20 70 10,tab3
      button " Uitzetten", 12, 30 40 70 10,tab3
      button " Aanzetten", 13, 30 20 70 10,tab4
      button " Uitzetten", 14, 30 40 70 10,tab4
      button " Sluiten", 19, 30 60 70 10,ok
    }
    on *:dialog:ChatToIRC-Ops:sclick:7:{ .set %Notices On | .set %Notices 1 | /window -n @Notice | echo -a 0,4 @Notices 0,12 Berichten Staat Nu AaN 0  }
    on *:dialog:ChatToIRC-Ops:sclick:8:{ .set %Notices Off | .set %Notices 0 | /window -c @Notice | echo -a 0,4 @Notices 0,12 Berichten Staat Nu UiT 0  }
    on *:dialog:ChatToIRC-Ops:sclick:9:{ .set %Channels On | .set %Channels 1 | /window -n @Channels | echo -a 0,4 @Channels 0,12 Berichten Staat Nu AaN 0  }
    on *:dialog:ChatToIRC-Ops:sclick:10:{ .set %Channels Off | .set %Channels 0 | /window -c @Channels | echo -a 0,4 @Channels 0,12 Berichten Staat Nu UiT 0  }
    on *:dialog:ChatToIRC-Ops:sclick:11:{ .set %Kicks/Bans On | .set %Kicks/Bans 1 | /window -n @Kicks/Bans | echo -a 0,4 @Kicks/Bans 0,12 Berichten Staat Nu AaN 0  }
    on *:dialog:ChatToIRC-Ops:sclick:12:{ .set %Kicks/Bans Off | .set %Kicks/Bans 0 | /window -c @Kicks/Bans | echo -a 0,4 @Kicks/Bans 0,12 Berichten Staat Nu UiT 0  }
    on *:dialog:ChatToIRC-Ops:sclick:13:{ .set %Clones On | .set %Clones 1 | /window -n @Cloons | echo -a 0,4 @Clones 0,12 Berichten Staat Nu AaN 0  }
    on *:dialog:ChatToIRC-Ops:sclick:14:{ .set %Clones Off | .set %Clones 0 | /window -c @Cloons | echo -a 0,4 @Clones  0,12 Berichten Staat Nu UiT 0  }
    
    on 1:START:{
      if (%Notices == 1) {  echo -m Notices Window 3Active | /window -n @Notice }
      if (%Channels == 1) {  echo -m Channels Window 3Active | /window -n @Channels }
      if (%Kicks/Bans == 1) { echo -m Kicks/Bans Window 3Active | /window -n @Kicks/Bans }
      if (%Clones == 1) { echo -m Clones Window 3Active | /window -n @Cloons }
    }
    
    on *:NOTICE:*:*: {
      if (%Notices == 1) { 
        if ($window(Notice)) && ($nick != $me)  {
          /window -m @Notice 
          /aline -n @Notice @Notice | echo @Notice 10[ $+ $time $+ ]12[ $+ $date $+ ]13 $network 10[NOTICE] 4 $+ $nick 1stuurde je net notice 4Bericht:12 
        } 
        elseif ($nick != $me) {
          /window -m @Notice 
          /aline -n @Notice @Notice | echo @Notice 10[ $+ $time $+ ]12[ $+ $date $+ ]13 $network 10[NOTICE] 4 $+ $nick 1stuurde je net notice 4Bericht:12 $1- 
        }
      }
    }
    
    on 1:BAN:#:{
      if (%Kicks/Bans == 1) {
        if ($me isin $nick) { Halt }
        /window -m @Kicks/Bans
        /aline -n @Kicks/Bans @Kicks/Bans | echo @Kicks/Bans 10[ $+ $time $+ ]12[ $+ $date $+ ] 10[BAN]14 $chan 4 $+ $nick 12zet mode4 $1- 
      }
    }
    on 1:UNBAN:#:{
      if (%Kicks/Bans == 1) {
        if ($me isin $nick) { Halt }
        /window -m @Kicks/Bans
        /aline -n @Kicks/Bans @Kicks/Bans | echo @Kicks/Bans 10[ $+ $time $+ ]12[ $+ $date $+ ] 10[UNBAN]14 $chan 4 $+ $nick 12zet mode4 $1- 
      }
    }
    on 1:KICK:#:{
      if (%Kicks/Bans == 1) {
        if ($me isin $nick) { Halt }
        /window -m @Kicks/Bans
        /aline -n @Kicks/Bans @Kicks/Bans | echo @Kicks/bans 10[ $+ $time $+ ]12[ $+ $date $+ ] 4[KICK]14 $chan 4 $+ $nick 2kick 6 $+ $knick 12 $1-
      }
    }
    on 1:VOICE:#:{
      if (%Channels == 1) {
        if ($me isin $nick) { Halt } 
        /window -m @Channels
        /aline -n @Channels @Channels | echo @Channels 10[ $+ $time $+ ]12[ $+ $date $+ ] 10[VOICE]14 $chan 4 $+ $nick 7voice12 $vnick
      }
    }
    on 1:DEVOICE:#:{
      if (%Channels == 1) {
        if ($me isin $nick) { Halt }
        /window -m @Channels
        /aline -n @Channels @Channels | echo @Channels 10[ $+ $time $+ ]12[ $+ $date $+ ] 10[Devoice]14 $chan 4 $+ $nick 7devoice12 $vnick
      }
    }
    on 1:HELP:#:{
      if (%Channels == 1) {
        if ($me isin $nick) { Halt }
        /window -m @Channels
        /aline -n @Channels @Channels | echo @Channels  10[ $+ $time $+ ]12[ $+ $date $+ ] 10[HALFOP]14 $chan 4 $+ $nick 7halfop12 $hnick
      }
    }
    on 1:DEHELP:#:{
      if (%Channels == 1) {
        if ($me isin $nick) { Halt }
        /window -m @Channels
        /aline -n @Channels @Channels | echo @Channels 10[ $+ $time $+ ]12[ $+ $date $+ ] 10[DEHALFOP]14 $chan 4 $+ $nick 7Dehalfop12 $hnick
      }
    }
    on 1:OP:#:{
      if (%Channels == 1) { 
        if ($me isin $nick) { Halt }
        /window -m @Channels
        /aline -n @Channels @Channels | echo @Channels 10[ $+ $time $+ ]12[ $+ $date $+ ] 10[OP]14 $chan 4 $+ $nick 7op12 $opnick
      }
    }
    on 1:DEOP:#:{
      if (%Channels == 1) { 
        if ($me isin $nick) { Halt }
        /window -m @Channels
        /aline -n @Channels @Channels | echo @Channels 10[ $+ $time $+ ]12[ $+ $date $+ ] 10[DEOP]14 $chan 4 $+ $nick 7deop12 $opnick
      }
    }
    on 1:OWNER:#:{
      if (%Channels == 1) {
        if ($me isin $nick) { Halt }
        /window -m @Channels
        /aline -n @Channels @Channels | echo @Channels 10[ $+ $time $+ ]12[ $+ $date $+ ] 10[OWNER]14 $chan 4 $+ $nick 7owner12 $opnick
      }
    }
    on 1:DEOWNER:#:{
      if (%Channels == 1) {
        if ($me isin $nick) { Halt }
        /window -m @Channels
        /aline -n @Channels @Channels | echo @Channels 10[ $+ $time $+ ]12[ $+ $date $+ ] 10[DEOWNER]14 $chan 4 $+ $nick 7deowner12 $opnick
      }
    }
    
    ###HL
    
    on *:Join:#: {
      if (%Clones == 1) {
        var %host_to_search_for = $address($nick,2)
        var %number_from_that_host = $ialchan(%host_to_search_for,$chan,0)
        if (%number_from_that_host > 1) {
          ;we have clones!
          ;first set up our vars and loop
          var %count = 0
          unset %clones
          :loop
          inc %count
          ;loop through every nick, adding the nicks to %clones
          var %clones = %clones $ialchan(%host_to_search_for,$chan,%count).nick
          if (%count < %number_from_that_host) { goto loop }
          /window -m @Cloons
          //aline -n @Cloons @Cloons | echo @Cloons 10[ $+ $time $+ ]12[ $+ $date $+ ] 10[CLOONS] 12op 14 $+ $chan 4 $+ %count $+  7-Cloons Gedetecteerd- 12Cloons Van 4 $+ $address($nick,2)
          //aline -n @Cloons @Cloons | echo @Cloons 10[ $+ $time $+ ]12[ $+ $date $+ ] 10[Nick Cloons] 12op 14 $+ $chan $+ :12 %clones
        }
      }
    }
    
    alias open {
      .window -ekn @Services 0 0 718 504 @Services Comic Sans MS 11
      .window -ekn @Notice 0 0 718 504 @Notice Courier New 10
    }
    
    On ^*:NoticE:*:#: {
      if (%Notices == 1) { 
        if ($nick isop $comchan($nick,1)) || ($nick isvo $comchan($nick,1)) { goto n }
        if ($nick == chanserv) || ($nick == memoserv) || ($nick == operserv) || (nickserv == $nick) { .echo @Services [  $nick $+ : $+ $chan ] $1- | halt }
        else { .echo @Notice 10[ $+ $time $+ ]12[ $+ $date $+ ]13 $network 10[NOTICE] 4 $+ $nick 1 - $+ $chan $+ -  $1- | halt }
        else { .echo @Notice Notice $nick - $+ $chan $+ -  $1- | halt }
        :n
      }
    }
    
    On ^*:NoticE:*:?: {
      if (%Notices == 1) { 
        if  ($nick isop $comchan($nick,1)) || ($nick isvo $comchan($nick,1)) { goto n }
        if ($nick == chanserv) || ($nick == memoserv) || ($nick == operserv) || (nickserv == $nick) { .echo @Services [  $nick  ] $1- | halt }
        else { .echo @Notice Notice $nick -Private-  $1- | halt }
        :n
      }
    }
    
    alias faddr {
      if (!$window(@Address)) { window -azdBke2 @Address $calc($window(-1).w /2 -250) $calc($window(-1).h /2 -125) 500 250 }
      if ($1) { search.addr $1- }
    }
    on *:INPUT:@Address: { if ($left($1,1) != /) && (!$ctrlenter) { search.addr $1- } }
    alias search.addr {
      var %:adr = $1-, %:a = 1
      aline -h @Address $chr(160)
      $iif($ial(%:adr,0),aline -h 4 @Address %:adr $+($chr(40),$v1,$chr(41)) on $network is:,aline -h 4 @Address %:adr no address found on $network)
      while (%:a <= $ial(%:adr,0)) {
        aline -h 15 @Address $+(%:a,$chr(41)) $+(14,$ial(%:adr,%:a).nick,) - $ial(%:adr,%:a).addr
        inc %:a
      }

     

  7. menu nicklist {
      comchan kick:{
        var %x 1
        while ($comchan($$1,%x)) { kick # $ifmatch | inc %x }
      }
    }
      .Twat-B-Gone: .msg Chanserv Kick $chan $1 you've been sparyed with industrial strength Twat-B-Gone(Kick #1).
      .Fuck Your Self: .msg Chanserv kick $chan $1 go outside and play hide and go fuck yourself(Kick #2).
      .your momma's bra: .msg Chanserv kick $chan $1 tell your mom can have her bra back im done using it for a sling shot(Kick#3).
      .Used tampon: .msg Chanserv kick $chan $1 slapped you with a used tampon ewwwwww(Kick#4).
      .Emo Kick: .msg chanserv kick $chan $1 Why dont you go outside and play hide and go cut yourself(Kick#5).
      .Caps kick: .msg chanserv kick $chan $1 Turn off your Caps lock(kick#6).
      .Pming Without Permission: .msg chanserv kick $chan $1 Dont Pm ppl without permission(Kick#7).
      .Age Upon Entry: .msg chanserv kick $chan $1 State your Age upon Entry(kick#8).
      .Racist:   .msg chanserv kick $chan $1 Racist language will not be tolerated(kick#9).
      .Trolling: .msg chanserv kick $chan $1 Dont Trolls Live Under Bridges(kick#10).
      .Under Age: .msg chanserv kick $chan $1 Come Back When your balls drop(kick#11).
      .Guest Nick: .msg chanserv kick $chan $1 Get A proper nick plz type /nick <newnickhere>(Kick#12).
      .
    } 

     

  8. Voici un script tout à fait simple à utiliser que j'ai écrit pour les opérateurs français sur mIRC. Je n'ai rajouté aucune contrainte de 'iff.' Si vous en voudriez une, vous pouvez me laisser un commentaire. Si vous faites un copier-coller de ceci dans la section de remotes, vous pourrez cliquer à droite sur un nom dans la liste de pseudos et les contrôler par ce script. (Le dernier kick peut être facilement effacé, si vous ne gérez pas un tchat uniquement en français.)

     

    ;Kicks Informatifs
    ;De: ZéléSansLogique
    
    alias kick: /kick $active $1 $2-
    
    menu nicklist {
      Kicks Informatifs
      .Personaliser:/kick # $1 $?="Raison"
      .Surveiller le langage:/kick # $1 Surveillez votre langage !!!
      .Activité Sexuelle:/kick # $1 Il est permis de blaguer, toutefois ne soyez pas trop grossier(ière)!!!
      .Floode:/kick # $1 Ne Floodez Pas.
      .Perturber:/kick # $1 Ne soyez pas un perturbateur/trice.
      .Menace:/kick # $1 Ne menacez personne.
      .Agacement:/kick # $1 Vous avez été kické comme vous agaciez. 
      .Vengance:/kick # $1 Merci d'avoir tenté de jouer !!!
      .Langue à part le français:/kick # $1 S'il vous plaît, essayez de votre vieux de parler en français sur ce salon }

     

  9. My first snippet on hawkee ^^ Just a simple nicklist script with a few funny kicks i made while being bored in my room on Buzz. Some strong language used in these. Lolz

    Just copy and paste in remote as new. The coding fits for my room and the server. Some changes may be needed to fit your needs. enjoy.

    and yes there is an old msn based middle finger kick in here. -.-

     

    menu nicklist { 
      Kicklist
      . Quick kicks
      ..Quick Kick:/kick # $$1 Bye!
      ..Loser:/kick # $$1 Lata Loser! :~
      ..FFS:/kick # $$1 FFS go the fuck away!! 8-)
      ..Duck my Sick:/msg $chan Duck my sick biotch! | /msg $chan In other words.... | /kick # $$1 SUCK MY DICK BITCH!! :@
      ..Suck it:/msg $chan :o OMG $$1 !! | /msg $chan How dare you whisper that to me! | /msg $chan No i dont want to suck on your bity thingies and no you cant suck on my toes!! | /kick # $$1 go find someone else to play with sicko!! :@
      ..Just go away:/msg $chan 8-) | /kick # $$1 Just go the fuck away!!
      . Mean Kicks
      ..Fuck Off:/msg $chan S eTahoma;0 .................__  | /msg $chan S eTahoma;0 .............../'_/)  | /msg $chan S eTahoma;0 ............,/.../ /  | /msg $chan S eTahoma;0 .........../..../ /  | /msg $chan S eTahoma;0 ...../'--/'...'/'-.'..  | /msg $chan S eTahoma;0 ../'/.../..../.....:.--\  | /msg $chan S eTahoma;0  ('(...'...'.... -_/'...'/  | /msg $chan S eTahoma;0 .\.................'...../  | /msg $chan S eTahoma;0 ..'\'...\.......... _..'  | /msg $chan S eTahoma;0 ....\..............(  | /msg $chan S eTahoma;0 ......\.............\  | /kick # $$1 FUCK OFF!!!
      ..Matrix:/msg # S \rTahoma;0 Wake up Neo...  | /msg # S \rTahoma;0 The Matrix has you...  | /msg # S \rTahoma;0 Follow The White Rabbit...  | timer1 1 4 kick $!comchan($me,1) $$1 It Went Thata Way (b^) ---->
      ..Kotex: /msg $chan Wahhhhh :'( i thought only bitches got their rag | /msg $chan Oh...wait...thats right...You ARE a bitch 8-) | /kick # $$1 Get a Fucking KOTEX and clean up this mess!! :@
      ..Village Idiot:/msg $chan Hey $$1, your village called. | /msg $chan They said they want their idiot back. | /me grabs $$1 and stuffs em in a box then calls UPS (o) (ap) | /kick # $$1 bon voyage $$1 !! :~ 
      . Mafia Kicks
      ..Mafia lag: { msg $chan Yo $$1 whodafuck you think you lookin at? ^o) | timer1 1 7 msg $chan $$1 i know that cho aint lookin at ME  | timer2 1 14 msg $chan Whodafuck you tink you are, lookin at me like dat? | timer3 1 21 msg $chan $$1 You betta watch whodafuckyou lookin at kid 8o| | timer4 1 28  msg $chan I told you not ta be lookin at me...what are you, stupid or sumptin? | timer5 1 35 msg $chan $$1 Yur askin fur it!!! :@ | timer6 1 42 /kick # $$1 Fuck you and ya lazy eye bitch! }
      ..Fish:/msg $chan <o))))>< | /msg $chan <o))))>< <o))))>< | /msg $chan <o))))>< <o))))>< <o))))><  | /msg $chan <o))))>< <o))))>< <o))))>< <o))))>< | /msg $chan <o))))>< <o))))>< <o))))>< <o))))>< <o))))>< | /kick # $$1 Time to Sleep wit da fishes mutherfucka!!
      . Pirate Kicks
      ..Bitchery:/msg $chan avast ye scurvy dogs! | /msg $chan No bitches be allowed 'ere on the Dragon Archadia, and ye have bean accused of bitchery by yur peers! | /msg $chan $$1 Wuz found guilty of all charges! | /msg $chan Time fer u 2 walk dee plank! | /kick # $$1 now get the fuck off my ship!! :@
      ..Pirate's Life:/msg $chan Yo Ho, Yo ho! | /msg $chan A pirate's life for me!! | /msg $chan Yo ho, Yo ho! | /kick # $$1 A Pirate's Bitch ye be!! (as)
      ..Bitch canon:/msg $chan Argh matey! | /msg $chan Ye be the biggest bitch ta ever sail the seven seas! | /me grabs $$1 and stuffs them into the Bitch cannon | /kick # $$1 BOOOOOM!! :~ :~ 
    - }

     

  10. Well i got bored over a few days and just coded a bunch of kicks. None of these kicks have bans, they all work, and they can easily be added on to, and even come complete with their own menu's ^^

    Just a side note, the kick called HKSPATK1 is an attack i coded that uses certain rules of Roleplaying to kill your combatant. It makes for an amusing kick if you add the coding at the end of it <<

    UPDATE
    Silent Timers added!! Woohoo!!

     

    .Kicks
    ..~RP Kicks~
    ...~Water~:{ /me "I am getting annoyed by your antics $1. you'd best shut up" Begins walking off
      .Timer 1 2 /me Suddenly stops and turns, a large silver gun in his hand, "You didn't think you'd get off that easy did you?"
      .Timer 1 4 /me Fires the gun into $1's head dematerilizing them, and transposing them into the Gun itself
      .Timer 1 6 /me Takes the gun and $1's particulate matter into his home
      .Timer 1 8 /me Loads up Windows, waits for password, Inputs password
      .Timer 1 10 /me Plugs he gun into the PC where $1's body is transported onto the screan
      .Timer 1 12 /me Watches $1 run around in fear of the pointer
      .Timer 1 14 /me Clicks on $1 a few times.. Click Click Click.. he hee
      .Timer 1 17 /me Opens Warcraft 3 The Frozen Throne
      .Timer 1 19 /me Loads up DOTA
      .Timer 1 21 /me Uses $1 as his Character
      .Timer 1 23 /me Has no specials, 1 Hit point no armor and is running direcly into Undead teritroty
      .Timer 1 25 /me Watches $1 die
      .Timer 1 27 /me does it again.. and then a quick few hundred times
      .Timer 1 29 /me Gets bored and quits DOTA, then loads up Oasiz 
      .Timer 1 31 /me Begins RPing as $1's character
      .Timer 1 33 /me Sucks horribly at it
      .Timer 1 35 /me Die's as $1, and watches $1 explode on screen. Cleans it off and drags it to the Trash can where $1 is kept for processing
      .Timer 1 37 /me Launches the Cyber Trash into Cyber space, and watches it crash against a Data Base in the Cyber Space 
      .Timer 1 38 Kick $chan $$1 *"Well, there is 1 byte of brainlessness i will never have to see again"* 
    }
    ...~Fire~:{ /me kicks $1 in the face with his heel, whirling around and bashing the back of $1's skull with his fists
      .Timer 1 2 /me running forward he extends his arms to grab $1's shoulders to slam $1 onto the ground
      .Timer 1 4 /me jumps on $1's back and kneels down, planting his knee into $1's spine
      .Timer 1 6 /me grabs $1's shoulders and pulls back, snapping their spine, and paralyzing them from the wasit down
      .Timer 1 8 /me pulls out a rusty knife and begins tearing off $1's clothing, leaving their undergarments in tact
      .Timer 1 10 /me chuckles and begins carving off $1's skin, chunk by chunk, and placing it aside for later
      .Timer 1 12 /me finishes skinning $1's back and flips their ragdoll body over, tearing off $1's bottom jaw in the process
      .Timer 1 14 /me smirks devilishly at $1 as blood fills their lungs.
      .Timer 1 16 /me Begins stuffing the filets of Skin down $1's throat
      .Timer 1 18 /me Takes pity on $1 and pulls out a strand of Piano wire
      .Timer 1 20 /me Slits $1's throat and stomps on $1's stomach, causing the slabs of flesh to shoot out all over the wall.. Eww..
      .Timer 1 22 kick $chan $$1 * dead. Go change your character* 
    }
    ...~Ice~:{ /me summons a large black cloud full of rain, hovering over $1
      .Timer 1 2 /me drops the tempreature down below absolute zero
      .Timer 1 4 /me forces the rain to fall through the air, freezing the droplets and turning them to spears
      .Timer 1 6 /me watches the millions of Ice Spears pierce $1
      .Timer 1 8 /me Laughs at $1 's swiss cheese looking corpse
      .Timer 1 10 kick $chan $$1 * Lets their body freeze at Absolute zero. Goodbye *
    }
    ...~Earth~:{ /me frown's at $1 's actions and turns to face them
      .Timer 1 2 /me cocks a brow and holds his palm out
      .Timer 1 4 /me watches as rocks begin spinning faster then the speed of sound around $1
      .Timer 1 6 /me this prevents them from moving
      .Timer 1 8 /me shoots spikes from for directions at $1 piercing them and hoisting them into the air
      .Timer 1 10 /me summons a huge garden gnome from the sky
      .Timer 1 12 kick $chan $$1 * $1 gets splatted by the big gnome. Much like the UBER PEA *
    }
    ...~Acid~:{ /me looks to $1 and sighs softly
      .Timer 1 2 say you made me to this
      .Timer 1 4 /me looks to the sky as it turns purple
      .Timer 1 6 /me summons acid rain to fall from the sky
      .Timer 1 8 /me laughs at it begins piercing $1 's flesh
      .Timer 1 10 Kick $chan $$1 * sighs as the wind blows away the remnant ashes of $1 's body*
      .Timer 1 12 /me walks back inside as if nothing happened
    }
    ...~HKSPATK1~:{ /me Rolls backwards, fireing twelve speres of homing sound like a gattaling cannon from his fingertips, the very space between him and $1 was distorted, the attack ripping through space
      .Timer 1 5 say 5 seconds passed)
      .Timer 1 10 /me "Blinks" forward, slashing at $1's top right collar bone, down to their left hip, his hand firing a ball of Chaos energy directly into their stomach
      .Timer 1 15 say 5 seconds passed))
      .Timer 1 17 /me ducks down and stabs upwards, sending a sonic ripple to $1's head, the ripple comming from a high pitched screech from his agape mouth
      .Timer 1 23 say 5 seconds passed))
      .Timer 1 26 /me looks down at $1's molecules, nothing more then an amorphous blob. Opening a portal to the Realm of Chaos, the molecules would slip in if they didn't move out of the way. Since in this incapacitated state<c>
      .Timer 1 28 /me $1 wouldn't be able to do much, since the molecules werent together to form a single entity, it prevented the spellcasting, or movement of $1 for roughly two minutes. Which was more then enough time<c>
      .Timer 1 29 /me for him to finish what he needed too<d>
      .Timer 1 34 say 5 seconds passed))
      .Timer 1 37 /me feels energy coursing through his veins as $1's body was compleatly absorbed. $1's energy, Chi Chakra, whatever you may call it, was used to feed his own powers, even the clothing of the poor<c>
      .Timer 1 39 /me victim being taken into the realm, destroyed, the once magical properties of the item no longer in tact. 
    }
    .~Song Kicks~
    ..~Lordi~
    ...~Biomechanic Man~:{ /me Turns into a Cyborg and shouts, "Biomechanic man!"
      .Timer 1 2 /me plays a Wild gutiar intro
      .Timer 1 4 /me Grins and says, "You need some lovin' o' monstermaniac style and fashion"
      .Timer 1 6 /me "And i'm a device of horny steel."
      .Timer 1 8 /me "You need a spin in the torture wheel"
      .Timer 1 10 /me "You need to get the healer in here"
      .Timer 1 12 /me "You gotta know when its bad"
      .Timer 1 14 /me "You gotta get in the cyber-feel"
      .Timer 1 16 /me "A little sicko, a little mean"
      .Timer 1 18 /me "and your sure to be damned"
      .Timer 1 20 /me chews up $1 's hand, cause he is the Biomechanic man
      .Timer 1 22 kick $chan $$1 * You just got Cyberfucked *
    }
    ...~Monsterman~:{ /me "Would you love a Monsterman?"
      .Timer 1 2 /me "Could you understand, Beauty of the beast?"
      .Timer 1 4 /me "I would do it all for you!"
      .Timer 1 6 /me "Would you do it all for me?"
      .Timer 1 8 /me "Yeah, i would freeze all hell over just to get a chill"
      .Timer 1 10 /me "Yeah i would slay -  I would maim"
      .Timer 1 12 /me "I would in thin air and reappear again"
      .Timer 1 14 /me dissipears from sight
      .Timer 1 16 /me Reappears behind $1
      .Timer 1 18 /me Freezes $1 in a block of ice
      .Timer 1 20 /me cuts $1 in half effectivly slaying them
      .Timer 1 22 kick $chan $$1 * You don't love a monsterman. *
    }
    ...~Rock The Hell Outta You~:{ /me ROCK
      .Timer 1 2 /me ROCK
      .Timer 1 4 /me ROCK
      .Timer 1 6 /me ROCK THE HELL OUT OF YOU!!
      .Timer 1 8 /me Grabs a huge Flying V
      .Timer 1 10 /me Plays a mad wicked riff
      .Timer 1 12 kick $chan $$1 * You just got the hell rocked out of you *
    }
    ...~Supermonstars~:{ /me "They strike you dumb"
      .Timer 1 2 /me "They bring you down"
      .Timer 1 4 /me "They keep you on the losing end"
      .Timer 1 6 /me "they tell you wrong is right, your high is low.. HERE WE GO!"
      .Timer 1 10 /me "Kick up a row, we're The Supermonstars!"
      .Timer 1 13 /me "We chant the anthem of the Phantoms!"
      .Timer 1 16 /me "Deal out the blows like a supermonstars! We are humble to none!"
      .Timer 1 18 /me holds his hands together and begins uttering a demonic chant
      .Timer 1 20 /me a huge grey shadow swoops down for $1 , and takes them away
      .Timer 1 22 kick $chan $$1 * the Anthem of the Phantoms will keep You on the end of my hammer *
    }
    ...~Blood Red Sandman~:{ /me They called me the leather Apron, they called me Sliling Jack
      .timer 1 2 /me they prayed to the heavens above, that I would never ever come back
      .timer 1 3 /me Can you hear how the children weep?
      .timer 1 4 /me Chills of fear like a Sawblade
      .timer 1 6 /me Cutting Deep
      .timer 1 8 /me takes a jigsaw from his backpack
      .timer 1 10 /me carves $1 up like a christmas Ham
      .timer 1 12 /me Sprinkles $1 's corpse with sand
      .timer 1 14 /me Steps on the bloody mess and smirks triumphant
      .timer 1 15 kick $chan $$1 * Ph3r3 t3h bL00d R3D SANDMAN!
    }
    .~Other~
    ..~Bodies~:{ /me 1, nothing wrong with me
      .Timer 1 1 /me 2, nothing wrong with me
      .Timer 1 2 /me 3, nothing wrong with me
      .Timer 1 3 /me 4, nothing wrong with me
      .Timer 1 5 /me 1, something's got to give
      .Timer 1 6 /me 2, something's got to give
      .Timer 1 7 /me 3, something's got to give
      .Timer 1 9 /me Let the bodies hit the floor
      .Timer 1 11 /me Let the bodies hit the floor
      .Timer 1 13 /me Let the bodies hit the floor
      .Timer 1 15 /me Dashes out
      .Timer 1 16 /me Breaks jaw
      .Timer 1 17 /me Snaps neck
      .Timer 1 19 /me Let the bodies hit the....
      .Timer 1 21 Kick $chan $$1 * FFFLLLLOOOOORRRRRR!!!!!!! *
    }
    ..~Avatar~:{ /me Frowns at $1 and growls, "Thats it, you have incured the wrath of the motherfukin avatar!"
      .Timer 1 2 /me Summons a huge Wave
      .Timer 1 4 /me Conjours a giant Fireball
      .Timer 1 6 /me Creates a Razor Wind
      .Timer 1 8 /me Makes big ass rock pillers
      .Timer 1 10 /me grins manicly
      .Timer 1 12 kick $chan $$1 * "KA-ME-HA-ME-AVATAR POWER!" Crushes $1 with his Hax04 Powerz *
    }

     

  11. This Is My Second Menu. Its A Custom Kick And Bans Menu. Simply Right Click on the user's name and select your kicks and bans, theres also a custom kick and ban dialog.

     

    ;F0x's Custom Kicks and Bans
    ;Made By F0x of the SwiftIRC Network
    ;Site: www.f0xb0t.net.tc
    ;Channel: #F0xB0t
    
    menu nicklist {
      F0x's Custom Kicks and Bans
      .Kicks
      ..Noob:/kick # $$1 2Stupid Noob
      ..Pwned:/kick # $$1 2Pwned!!
      ..Owned:/kick # $$1 2http:// $+ $$1 $+ .justgotowned.com
      ..Volcano:/kick # $$1 2Feel The Heat Of The Volcano!
      ..Steal:/kick # $$1 2I Will Steal Your Channel Status!
      ..Raped:/kick # $$1 2Rape This!
      ..Bitch:/kick # $$1 2Bitch Much?
      ..Specified Kicks
      ...Spamming:/kick # $$1 2Stop Spamming
      ...Flooding:/kick # $$1 2Stop Flooding
      ...Swearing:/kick # $$1 2Stop Swearing
      ...Advertising:/kick # $$1 2No Advertising In Here!
      ...Respect Ops:/kick # $$1 2Respect The Ops Idiot.
      ...I Just Don't Like You:/kick # $$1 2You Know What? I Just Don't Like You.
      ..Custom Kick:/dialog -m f0xkick f0xkick
      .Bans
      ..Noob:/ban -k # $$1 2Stupid Noob
      ..Pwned:/ban -k # $$1 2Pwned!!
      ..Owned:/ban -k # $$1 2http:// $+ $$1 $+ .justgotowned.com
      ..Volcano:/ban -k # $$1 2Feel The Heat Of The Volcano!
      ..Steal:/ban -k # $$1 2I Will Steal Your Channel Status!
      ..Raped:/ban -k # $$1 2Rape This!
      ..Bitch:/ban -k # $$1 2Bitch Much?
      ..Specified Bans
      ...Spamming:/ban -k # $$1 2Stop Spamming
      ...Flooding:/ban -k # $$1 2Stop Flooding
      ...Swearing:/ban -k # $$1 2Stop Swearing
      ...Advertising:/ban -k # $$1 2No Advertising In Here!
      ...Respect Ops:/ban -k # $$1 2Respect The Ops Idiot.
      ...I Just Don't Like You:/ban -k # $$1 2You Know What? I Just Don't Like You.
      ..Custom Ban:/dialog -m f0xban f0xban
    }
    alias f0xkick {
      dialog -m f0xkick f0xkick
    }
    dialog f0xkick {
      title "F0x's Custom Kicks & Bans"
      size -1 -1 131 111
      option dbu
      text "By F0x", 1, 50 102 60 10
      box "Custom Kicks", 3, 1 1 130 110, centre
      edit "Nick", 4, 33 11 67 13
      edit "Reason", 5, 33 28 67 13
      edit "#channel", 6, 33 45 67 13
      button "Kick", 7, 69 75 37 12
      button "Cancel", 8, 45 90 37 12, Cancel
    }
    on *:dialog:f0xkick:sclick:7:{
      /kick $did(6) $did(4) $did(5)
    }
    alias f0xban {
      dialog -m f0xban f0xban
    }
    dialog f0xban {
      title "F0x's Custom Kicks & Bans"
      size -1 -1 131 111
      option dbu
      text "By F0x", 1, 50 102 60 10
      box "Custom Bans", 3, 1 1 130 110, centre
      edit "Nick", 4, 33 11 67 13
      edit "Reason", 5, 33 28 67 13
      edit "#channel", 6, 33 45 67 13
      button "Ban", 7, 69 75 37 12
      button "Cancel", 8, 45 90 37 12, Cancel
    }
    on *:dialog:f0xban:sclick:7:{
      /ban -k $did(6) $did(4) $did(5)
    }

     

  12. [¤1-Description¤] :
    I made this snippet because sometimes when we want to kick an user we use the mouse, but it's take long time that's why i made this snippet to facilitate the process of kick

    [¤2-Use¤] :

    1) - Alt +r and put this snippet inro u'r remote
    2) - use F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,11 and F12 into your keyboard
    type /helpk to see all commands if you forget them !

    [¤3-Reason of kicks¤] :

    cF1 » (CTRL+F1) kicks an user for Flood
    F2 » kicks an user for Spam
    F3 » kicks an user for Repeating
    F4 » kicks an user for Ads
    F5 » kicks an user for CAPs letters
    F6 » kicks an user for Bad word
    F7 » kicks an user for feeling HOT
    F8 » kicks an user for sex like F7
    F9 » kicks an user for language
    F10 » kicks an user who has -18
    F11 » kicks an user for personal infos (MSN,Yahoo,facebook...ect)
    F12 » kicks an user who has bad nick

    [¤2-Other way to kick¤] :

    -if you don't like to kick by keys F* you can use Aliase :

    /k1 nickname / nicknames » kicks an user for Flood
    /k2 nickname / nicknames » kicks an user for Spam
    /k3 nickname / nicknames » kicks an user for Repeating
    /k4 nickname / nicknames » kicks an user for Ads
    /k5 nickname / nicknames » kicks an user for CAPs letters
    /k6 nickname / nicknames » kicks an user for Bad word
    /k7 nickname / nicknames » kicks an user for feeling HOT
    /k8 nickname / nicknames » kicks an user for sex like F7
    /k9 nickname / nicknames » kicks an user for language
    /k10 nickname / nicknames » kicks an user who has -18
    /k11 nickname / nicknames » kicks an user for personal infos (MSN,Yahoo,facebook...ect)
    /k12 nickname / nicknames » kicks an user who has bad nick

     

    #####Put this in REMOTE
    alias cF1 {
      kick $chan $* Flood disturbs everyone, please write as much as you can on one line !
    }
    alias F2 {
      kick $chan $* Spamming is not allowed here !
    }
    alias F3 {
      kick $chan $* We understood you the first time, there is no need to repeat yourself !
    }
    alias F4 {
      kick $chan $* Ads are forbidden here !
    }
    alias F5 {
      kick $chan $* Please do not abuse of the cap locks ! It unnecessarily disturbs everyone on the chat.
    }
    alias F6 {
      kick $chan $* Please stay polite !
    }
    alias F7 {
      kick $chan $* For those who are feeling hot, got on #hotchannel !
    }
    alias F8 {
      kick $chan $* You're on a chat, not on a porn site ! 
    }
    alias F9 {
      kick $chan $* Please write in english !  
    }
    alias F10 {
      kick $chan $* Sorry, but  you can't stay here (+18)
    }
    alias F11 {
      kick $chan $* No personal infos here or in private ! 
    }
    alias F12 {
      kick $chan $* Your username isn't correct. Change it to be able to come back !
    }
    
    alias helpk {
      var %cpteur = 1
      echo -at 4Flood            5->     12cF1 7or 12/k1
      echo -at 4Spam           5->     12F2 7or 12/k2
      echo -at 4Repeating   5->     12cF3 7or 12/k3
      echo -at 4Ads               5->     12cF4 7or 12/k4
      echo -at 4Caps letters 5->    12cF5 7or 12/k5
      echo -at 4Bad word      5->    12cF6 7or 12/k6
      echo -at 4Hot                 5->    12cF7 7or 12/k7
      echo -at 4Sex                 5->    12cF8 7or 12/k8
      echo -at 4Language     5->    12cF9 7or 12/k9
      echo -at 4Age                 5->    12cF10 7or 12/k10
      echo -at 4personal infos 5-> 12cF117or 12/k11
      echo -at 4Badnick           5->    12cF12 7or 12/k12
    }
    
    #####Put this in ALIASES
    k1 kick kick # $* Flood disturbs everyone, please write as much as you can on one line !
    k2 kick # $* Spamming is not allowed here !
    k3 kick # $* We understood you the first time, there is no need to repeat yourself !
    k4 kick # $* Ads are forbidden here !
    k5 kick # $* Please do not abuse of the cap locks ! It unnecessarily disturbs everyone on the chat.
    k6 kick # $* Please stay polite !
    k7 kick # $* For those who are feeling hot, got on #hotchannel !
    k8 kick # $* You're on a chat, not on a porn site ! 
    k9 kick # $* Please write in english !  
    k10 kick # $* Sorry, but  you can't stay here (+18)
    k11 kick # $* No personal infos here or in private ! 
    k12 kick # $* Your username isn't correct. Change it to be able to come back !

     

  13. Kick and Ban Counters, with Echo and Clear. Needs DCX.dll to run. Copypasta to new remotes. Enjoy.

     

    #KCounter on
    
    on *:kick:#:if ( $nick == $me ) inc %kicks 1
    
    alias kick { if ($me isop $1) && ($2 ison $1) { kick $1 $2 $3- 3,1(14Kick  $+ #0 %kicks  $+ 3)7 >>> 3(14ProtheusIRC3) } }
    
    #KCounter End
    
    #BCounter on
    
    on *:ban:#:if ( $nick == $me ) inc %bans 1
    
    alias ban { if ($me isop $1) && ($2 ison $1) { mode $chan +b $1 $2 $3- | /msg $chan 3,1(14Ban  $+ #0 %bans  $+ 3)7 >>> 3(14ProtheusIRC 3) } }
    
    #BCounter End
    alias kbcounters {
      if ($dialog(kbcounters)) { dialog -x kbcounters }
      dialog -m kbcounters kbcounters
    }
    
    alias DCX_kbcounters {
    }
    
    dialog kbcounters {
      title "Kick/Ban Counters"
      size -1 -1 138 138
      option dbu
      box "Kicks", 1, 6 3 50 50
      box "Options", 4, 81 3 50 50
      box "Bans", 7, 6 83 50 50
      box "Options", 10, 81 83 50 50
    }
    
    on *:dialog:kbcounters:init:*: {
      dcx Mark $dname kbcounters_cb
      xdialog -g kbcounters +b $rgb(0,0,0)
      xdialog -c $dname 2 button 22 25 80 30
      xdid -t $dname 2 On
      xdid -w $dname 2 +n 112 shell32.dll
      xdialog -c $dname 3 button 22 64 80 30
      xdid -t $dname 3 Off
      xdid -w $dname 3 +n 131 shell32.dll
      xdialog -c $dname 5 button 172 25 80 30
      xdid -t $dname 5 Echo
      xdid -w $dname 5 +n 146 shell32.dll
      xdialog -c $dname 6 button 172 64 80 30
      xdid -t $dname 6 Clear
      xdid -w $dname 6 +n 31 shell32.dll
      xdialog -c $dname 8 button 22 186 80 30
      xdid -t $dname 8 On
      xdid -w $dname 8 +n 112 shell32.dll
      xdialog -c $dname 9 button 22 225 80 30
      xdid -t $dname 9 Off
      xdid -w $dname 9 +n 131 shell32.dll
      xdialog -c $dname 12 button 172 186 80 30
      xdid -t $dname 12 Echo
      xdid -w $dname 12 +n 146 shell32.dll
      xdialog -c $dname 13 button 172 225 80 30
      xdid -t $dname 13 Clear
      xdid -w $dname 13 +n 31 shell32.dll
      xdialog -c $dname 14 button 98 124 80 30
      xdid -t $dname 14 Close
      xdid -w $dname 14 +n 27 shell32.dll
    }
    
    alias kbcounters_cb {
      if ($2 == sclick) && ($3 == 2) {
        /.enable #KCounter | echo -a 3(14ProtheusIRC3) 3,1K14,1ick 3C14,1ounter 3I14,1s 3N14,1ow 3T14,1urned 3O14,1n 
      }
      else if ($2 == sclick) && ($3 == 3 ) { 
        /.disable #KCounter | echo -a 3(14ProtheusIRC3) 3,1K14,1ick 3C14,1ounter 3I14,1s 3N14,1ow 3T14,1urned 3O14,1ff 
      }
      else if ($2 == sclick) && ($3 == 5 ) { 
        /echo -a 3,1I 3,1H14,1ave 3,1K14,1icked0 %kicks 3,1T14,1imes 3,1S14,1o 3,1F14,1ar7 >>> 3(14ProtheusIRC3) 
      }
      else if ($2 == sclick) && ($3 == 6 ) { 
        /unset %kicks |  /echo -a 3,1C14,1leared.7 >>> 3(14ProtheusIRC3) 
      }
      else if ($2 == sclick) && ($3 == 8 ) { 
        /.enable #BCounter | echo -a 3(14ProtheusIRC3) 3,1B14,1an 3C14,1ounter 3I14,1s 3N14,1ow 3T14,1urned 3O14,1n 
      }
      else if ($2 == sclick) && ($3 == 9 ) { 
        /.disable #BCounter | echo -a 3(14ProtheusIRC3) 3,1B14,1an 3C14,1ounter 3I14,1s 3N14,1ow 3T14,1urned 3O14,1ff 
      }
      else if ($2 == sclick) && ($3 == 12) { 
        /echo -a 3,1I 3,1H14,1ave 3,1B14,1anned0 %bans 3,1P14,1eople 3,1S14,1o 3,1F14,1ar7 >>> 3(14ProtheusIRC3) 
      }
      else if ($2 == sclick) && ($3 == 13) { 
        /unset %bans |  /echo -a 3,1C14,1leared.7 >>> 3(14ProtheusIRC3) 
      }
      else if ($2 == sclick) && ($3 == 14) {
        /dialog -x kbcounters
      }
    }

     

  14. Eggdrop auto reply

    if anybody pm your bot it will reply to that user with assigned messages

     

    #=======================================================#
    #Timer for reply. Bot will take time to reply the DM.   #
    #In seconds ( well 60 seconds in a minute. LOL )        #
    #=======================================================#
    
    set rplytimer 10
    
    #=======================================================#
    #The messages can be edited as you like. Just put them  #
    #in "" and keep it in order. if you fuck it up dont say #
    #to people this script dont work. =)                    #
    #=======================================================#
    
    set autorply {
    "Im a Functional Alcoholic but not Functioning atm @;"
    "Yes Im here"
    "What do you want?"
    }
    
    #========================================================#
    #You can edit this if you are big boy!. im just a        #
    #plebeian.                                               #
    #========================================================#
    
    bind msgm - * msgm:reply
    
    proc msgm:reply {nick host hand text} {
     global autorply rplytimer
     utimer $rplytimer  [list puthelp "PRIVMSG $nick :Hello $nick [lindex $autorply [rand [llength $autorply]]]"]
    }
    putlog "autoreply.tcl 0.1 by Error loaded"

     

  15. on $*:TEXT:/(www\56|\57\57\56|\72\57\57|\43[a-zA-Z]|.com|.net|.org)/iS:*: {
      if ($nick isreg #) {
        inc %ad. [ $+ [ $wildsite ] ]
        if (%ad. [ $+ [ $wildsite ] ] == 1) { .notice $nick This is your first warning to notify you that you are advertising without authorization. }
        if (%ad. [ $+ [ $wildsite ] ] == 2) { .kick $chan $nick You have been kicked due to an unauthorized advertisement. }
        if (%ad. [ $+ [ $wildsite ] ] == 3) { ban -ku120 $nick 2 You have been banned for two minutes due to a repeated offense of an unauthorized advertisement. }
        if (%ad. [ $+ [ $wildsite ] ] == 4) { ban -ku1800 $nick 2 You have been banned for thirty minutes due to a repeated offense of an unauthorized advertisement. | unset %ad. [ $+ [ $wildsite ] ] }
      }
    }

     

  16. I checked the snippets and only found mIRC platform swear kickers.

    This is a simple swear checker that can be adjusted to each channel via dcc (partyline) or a public/msg command.

    Protects all users added to bot userfile, all channel @/Ops and +/Voices.

    Default trigger set to "!"

    SYNTAX:

    PUBLIC: !noswear on
    PUBLIC: !noswear off

    MSG: /msg yourbot noswear #channelname on
    MSG: /msg yourbot noswear #channelname off

    NOTE: Available to Global OP (o) and above, Channel Master (m) and above.

     

    # NoSwear Module
    
    # Set global trigger here
    set trigger "!"
    
    # Set your swearword pattern below
    set swearwords {
      "*fuck*"
      "*cunt*"
      "*shit*"
    }
    
    # -----DONT EDIT BELOW-----
    bind pub - ${trigger}noswear noswear:pub
    bind msg - noswear noswear:msg
    bind pubm - * noswear:text
    bind ctcp - ACTION noswear:act
    
    setudef flag noswear
    
    proc getTrigger {} {
      global trigger
      return $trigger
    }
    
    proc noswear:pub {nick uhost hand chan text} {
      if {![matchattr $hand o|m $chan]} {return}
      if {([lindex [split $text] 0] == "") && (![regexp c [getchanmode $chan]])} {putquick "PRIVMSG $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [getTrigger]noswear on/off"; return}
      if {([lindex [split $text] 0] == "") && ([regexp c [getchanmode $chan]])} {putquick "PRIVMSG $chan :ERROR: Incorrect Parameters. SYNTAX: [getTrigger]noswear on/off"; return}
    
      if {[lindex [split $text] 0] == "on"} {
        if {[channel get $chan noswear] && ![regexp c [getchanmode $chan]]} {putquick "PRIVMSG $chan :\037ERROR\037: This setting is already enabled."; return}
        if {[channel get $chan noswear] && [regexp c [getchanmode $chan]]} {putquick "PRIVMSG $chan :ERROR: This setting is already enabled."; return}
        channel set $chan +noswear
        puthelp "PRIVMSG $chan :Enabled Swearing Protection for $chan"
      }
    
      if {[lindex [split $text] 0] == "off"} {
        if {![channel get $chan noswear] && ![regexp c [getchanmode $chan]]} {putquick "PRIVMSG $chan :\037ERROR\037: This setting is already disabled."; return}
        if {![channel get $chan noswear] && [regexp c [getchanmode $chan]]} {putquick "PRIVMSG $chan :ERROR: This setting is already disabled."; return}
        channel set $chan -noswear
        puthelp "PRIVMSG $chan :Disabled Swearing Protection for $chan"
      }
    }
    
    proc noswear:msg {nick uhost hand arg} {
      global botnick
      set chan [strlwr [lindex $arg 0]]
      if {![matchattr $hand o|m $chan]} {return}
      if {![string match "*#*" $arg]} {return}
      if {[lindex [split $arg] 0] == ""} {putquick "NOTICE $nick :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: /msg $botnick noswear #channel on/off"; return}
      if {[lindex [split $arg] 1] == ""} {putquick "NOTICE $nick :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: /msg $botnick noswear $chan on/off"; return}
    
      if {[lindex [split $arg] 1] == "on"} {
        if {[channel get $chan noswear]} {putquick "NOTICE $nick :\037ERROR\037: This setting is already enabled."; return}
        channel set $chan +noswear
        putquick "NOTICE $nick :Enabled Swearing Protection for $chan"
      }
    
      if {[lindex [split $arg] 1] == "off"} {
        if {![channel get $chan noswear]} {putquick "NOTICE $nick :\037ERROR\037: This setting is already disabled."; return}
        channel set $chan -noswear
        putquick "NOTICE $nick :Disabled Swearing Protection for $chan"
      }
    }
    
    proc noswear:text {nick uhost hand chan text} {
      global swearwords
      if {[channel get $chan noswear]} {
        foreach pattern $swearwords {
          if {[string match -nocase $pattern $text]} {
            if {![validuser $hand] && ![isop $nick $chan] && ![isvoice $nick $chan]} {
              putquick "MODE $chan +b *!*@[lindex [split $uhost @] 1]"
              putquick "KICK $chan $nick :\002\037S\037\002wear-\002\037W\037\002ord \002\037D\037\002etected. Please cease use of profanity while in $chan - Thank you."
            }
          }
        }
      }
    }
    
    proc noswear:act {nick uhost hand dest key text} {
      global swearwords
      if {![string match "*#*" $dest]} {return}
      set chan $dest
      if {[channel get $chan noswear]} {
        foreach pattern $swearwords {
          if {[string match -nocase $pattern $text]} {
            if {[botisop $chan] && ![isbotnick $nick]} {
              if {[onchan $nick $chan] && ![validuser $hand] && ![isop $nick $chan] && ![isvoice $nick $chan]} {
                putquick "MODE $chan +b *!*@[lindex [split $uhost @] 1]" 
                putquick "KICK $chan $nick :\002\037S\037\002wear-\002\037W\037\002ord \002\037D\037\002etected. Please cease use of profanity while in $chan - Thank you."
              }
            }
          }
        }
      }
    }
    
    putlog "Loaded: NoSwear Module."
  17. This is just a little snippet and can be handle for those who use simple mIRC and like to add only small codes in way
    to keep their mIRC on control (Full scripts always give troubles , expecially to IRC operators or just simple operator
    of the room. All i can say about this masskick code is that , if you are operator in a room and for some reasons you need
    (or want) to kick all the users in it , then just type /masskick in the channel. I plan to do some other mass stuff
    and some flood protection snippets in the will.

    ;copy and paste this code to your mirc script editor/remotes.
    alias masskick {
      unset %total
      set %count.nick 0
      set %total $nick(#,0)
      :start
      inc %count.nick
      if (%count.nick > %total) { halt }
      if ($nick(#,%count.nick) == $me) { goto start }
      else { kick # $nick(#,%count.nick) Masskick Everyone is kicked so don't take it personal . | goto start }
    }

     

  18. The below snippets will tell the user what the bad word was they said , kick the user from the channel and then ban them for 30 seconds when they use a badword ( your choice of words there ) in the channel as a regular text , an emote or a notice.

    Update: There is now an " on CONNECT " and Alias to help in the setting of the vairable.

    Update: Changed $nick to be $address($nick,2)

    Update: Added two aliases that allow you to add and removes words from the variable %badwords

     

    on *:CONNECT:   if (!%badwords) { set %badwords put,words,here,seperated,by,commas } 
      echo -a %badwords has been set  }
      else { echo -a The badwords have already been set. }
    }
    
    alias bdwd {
      if (!%badwords) { set %badwords put,words,here,seperated,by,commas } 
      echo -a %badwords has been set  }
      else { echo -a The badwords have already been set. }
    }
    
    ---------------------------------
    ---------------------------------
    */
    The below two aliases can add ( one or more words at a time ) and delete ( one word at a time ) words from the list.
    */
    
    alias addword {
      if (!$1) { echo Please specify something to be added. | halt }
      var %i 1
      while (%i <= $0) {
      if ($istok(%badwords, $ [ $+ [ %i ] ] ,44)) { echo That word or words is already in the list | halt } | inc %i }
      set %badwords $replace($addtok(%badwords,$1-,32),$chr(32),$chr(44))
      echo The new list is --> %badwords
    }
    
    alias delword {
      if (!$1) { echo Please specify something to be removed. | halt }
      if (!$istok(%badwords,$1,44)) { echo That word is not in the list. | halt }
      else {
        set %badwords $remtok(%badwords,$1,44)
        echo The new list is --> %badwords
      }
    }
    
    ---------------------------------
    ---------------------------------
    
    on @*:text:*:#: { 
      var %i 1
      while (%i <= $0) {
      if ($istok(%badwords, $ [ $+ [ %i ] ] ,44)) { msg $chan Please do not use such language in $chan again.  | timer 1 3 kick # $nick $nick $+ , To the curb with you gutter mouth! 30 Second ban. | timer 1 5 ban -u30 $chan $address($nick,2) | halt } | inc %i }
      else { halt }
    }
    
    -----------------------------------
    
    on @*:action:*:#: {
      var %i 1
      while (%i <= $0) {
      if ($istok(%badwords, $ [ $+ [ %i ] ] ,44)) { msg $chan Please do not emote such language in $chan again.  | timer 1 3 kick # $nick $nick $+ , To the curb with you gutter mouth! 30 Second ban. | timer 1 5 ban -u30 $chan $address($nick,2) | halt } | inc %i }
      else { halt }
    }
    
    -------------------------------------
    
    on @*:notice:*:#: {
      var %i 1
      while (%i <= $0) {
      if ($istok(%badwords, $ [ $+ [ %i ] ] ,44)) { msg $chan Please do not notice such language in $chan again.  | timer 1 3 kick # $nick $nick $+ , To the curb with you gutter mouth! 30 Second ban. | timer 1 5 ban -u30 $chan $address($nick,2) | halt } | inc %i }
      else { halt }
    }

     

  19. Tye (tye at mirc . net) DALnet #mIRC / Undernet #mirc.net, #hawkee.com
    ; 
    ; This collection of snippets does a few things:
    ;  - Displays all clones in a channel
    ;  - Displays a user's clones when they join a channel
    ;  - Kick/Ban clones when they join a channel (enabled per channel)
    ;  - Kick/Ban clones in a channel
    ;
    ; These scripts are public domain. You can do whatever you want with them.
    ;
    ; If you need help with with these snippets please ask your question on the www.hawkee.com
    ; forums.
    
    ; To install simply paste the code in your remotes
    ; The snippets can be used/configured from the channel/nicklist popups
    ; The 'clone threshold' setting is how many _clones_ are allowed in the channel (not how many users from the same host). A threshold of 0 means no clones are allowed (only 1 user per host)
    
    ; /showclones #channel [-k]
    ; Will display all clones in #channel
    ; If you give the -k parameter all clones above the channel's threshold will be kicked/banned
    alias showclones {
      if ($hget(clones)) hfree clones
      hmake clones 10
      var %x = $nick($1,0)
      while (%x) {
        var %addr = $address($nick($1,%x),2)
        ; Get user's clones
        var %g = $clones(%addr,$1)
        var %n = $gettok(%g,2-,32), %g = $gettok(%g,1,32)
        if (%n) && (!$hget(clones,%addr)) {
          ; If we haven't already shown clones from this host then do that now
          echo $colour(info) $1 *** %g clones from %addr $+ : %n
          ; If there are more clones than the threshold, and the user is not protected, start kicking
          if ($2 = -k) && (%g > $thresh($1)) && (!$is_clone_prot($address($nick($1,%x),5))) {
            mode $chan +b %addr
            .timer 1 600 mode $chan -b %addr
            var %xx = $ialchan(%addr,$1,0)
            while (%xx) {
              if ($ialchan(%addr,$1,%xx).nick isreg $1) { kick $chan $ifmatch Clones from %addr }
              dec %xx
            }
          }
          hinc clones %addr
        }
        dec %x
      }
      hfree clones
    }
    
    ; $clones(*!*@site,#channel)
    ; Returns the number of clones matching *!*@site and their nicknames in this format:
    ;    N nicknames
    ; where N is the number of clones and nicknames is a space delimited list of the users.
    alias clones {
      var %x = $ialchan($1,$2,0)
      if (%x = 1) { return 1 }
      if (%x > 80) { return %x Too many to list }
      var %r
      while (%x) {
        %r = %r $ialchan($1,$2,%x).nick
        dec %x
      }
      return $ialchan($1,$2,0) %r
    }
    
    ; The options below the seperator are per channel settings.
    menu channel {
      Clone Utilities
      .Show clones in $chan:showclones #
      .Kick/Ban current clones:if ($input(Are you sure you want to kick/ban all clones in $chan $+ ?,y)) { showclones # -k }
      .$iif($($+(%,clones.join),2),$style(1)) Show clones on join:if ($($+(%,clones.join),2)) { set $+(%,clones.join) 0 } | else { set $+(%,clones.join) 1 }
      .-
      .$iif($($+(%,clones.kick.,$chan),2),$style(1)) Kick/Ban clones on join:if ($($+(%,clones.kick.,$chan),2)) { set $+(%,clones.kick.,$chan) 0 } | else { set $+(%,clones.kick.,$chan) 1 }
      .Clone threshold - $thresh($chan).1:set $+(%,clones.th.,$chan) $input(Enter how many clones a site is allowed in the channel [0 means only 1 user/host $+ $chr(44) 1 means 2 users/host]:,e)
    }
    menu nicklist {
      $iif(!$is_clone_prot($address($$1,5)),Clone Utilities)
      .Protect User
      ..$submenu($getmasks($1))
      $iif($is_clone_prot($address($$1,5)),Clone Utilities)
      .Unprotect $is_clone_prot($address($$1,5)).addr:ruser $is_clone_prot($address($$1,5)).addr
    }
    alias -l getmasks {
      if ($1 > 19) { return }
      return $1 $address($snick($active,1),$1) $+ :auser cloneprotect $address($snick($active,1),$1)
    }
    ; $is_clone_prot(nick!user@host)
    ; Returns $true of user is protected from clone kick
    alias is_clone_prot {
      var %x = $ulist(*,cloneprotect,0)
      while (%x) {
        var %a = $ulist(*,cloneprotect,%x)
        if (%a iswm $1) { return $iif($prop = addr,%a,$true) }
        dec %x
      }
      return $false
    }
    ON *:JOIN:#: {
      ; Show users clones
      var %n = $clones($wildsite,$chan)
      if ($($+(%,clones.join),2)) {
        if ($gettok(%n,2-,32)) {
          echo -tc info2 $chan * $gettok(%n,1,32) clones from $wildsite $+ : $gettok(%n,2-,32)
        }
      }
      ; If you are opped, there are more clones from the host than the threshold allows, kicking clones has been enabled for this channel and the user is not protected, kick/ban the clones
      if ($me isop $chan) && ($gettok(%n,1,32) > $thresh($chan)) && ($($+(%,clones.kick.,$chan),2)) && (!$is_clone_prot($fulladdress)) {
        ; Ban the host if we haven't already
        if (!$($+(%,clonekicking,$cid,$chan,$wildsite),2)) {
          mode $chan +b $wildsite
          .timer 1 600 mode $chan -b $wildsite
          set -u10 $+(%,clonekicking,$cid,$chan,$wildsite) 1
        }
        var %x = $ialchan($wildsite,$chan,0)
        while (%x) {
          ; Kick this user is we haven't already
          if ($ialchan($wildsite,$chan,%x).nick isreg $chan) && (!$($+(%,clonekicking,$cid,$chan,$ifmatch),2)) {
            var %nick = $ialchan($wildsite,$chan,%x).nick
            kick $chan %nick Clones from $wildsite
            set -u10 $+(%,clonekicking,$cid,$chan,%nick) 1
          }
          dec %x
        }
      }
    }
    ; Returns the clone threshold for a channel
    ; $thresh(#channel).N
    ; If you give the N parameter that value will be subtratced from the threshold.
    ; The threshold returns the maximum number of users a host can have in #channel,
    ; not the number of clones a host can have. Use $thresh(#channel).1 to get the
    ; number of clones a host can have.
    alias -l thresh {
      if ($($+(%,clones.th.,$1),2) != $null) { return $calc($ifmatch + 1 - $prop) }
      return $calc(1 - $prop)
    }

     

  20. In the next few days we will be adding more snippets and IRC scripts and other chat network scripts.

    Some of the scripts will be in various languages along with some snippets. I will also be adding archive snippets so that they remain and not lost. We belive all work that has been done in the past should be kepted as guides to improve scripting skills and vice versa.

    So if anyone has old scripts by all means let me know and I'll add them.
×
×
  • Create New...