Eggdrop-Level script for mIRC-Bot

By DjSxX on Feb 02, 2014

This will make your mIRC-bot to act like an eggdrop, its pretty simple coded,but it works.
Ohh and this snippet is in de language dutch, but it is easy translatable :)
only thing you will have to do, is to create a users.ini and channels.ini file in the appdata/roaming/mirc folder
and copy paste the lines on below
users.ini:
[yournickname]
flags=nmov

channels.ini:
[#yourchannel]

After that just type /msg pass
Just login /msg login

and copy paste this into aliases:
/addnotice {
notice $1 $2 is nu als $3 toegevoegd.
notice $2 $nick heeft je als een $3 toegevoegd.
notice $2 Nu zou je een paswoord moeten instellen. /msg $me pass
}

Any Questions?
You can find me on IRC
irc.chatters4all.nl
www.chatters4all.nl

;##########################################################
;# Eggdrop-level script                                                                     #
;##########################################################
;# By DjSxX                                                                  #
;# Comments can be mailed to djsxx@live.nl                     #
;##########################################################
;# Any change made to THIS FILE has to be reported to                     #
;# DjSxX on irc.chatters4all.nl                                          #
;# I would also like to know about every redistribution                         #
;# of this script.                                                                              #
;##########################################################
;# Contact information:                                                                     #
;# - Email:                                                                                       #
;#                                                               #
;#                                                                #
;# - IRC:                                                                                          #
;#   + irc.chatters4all.nl (#lele)                                                #
;#                    
;##########################################################

;INITIALIZING
on *:connect:{
  join #radiocandymen
  rlevel 1000
  rlevel 500
  rlevel 250
  rlevel 100
}

;BAN CHECKER
on gb:JOIN:#:{ mode $chan +b $nick | kick $chan $nick Globale ban }
on cb:JOIN:#:{
  if ($chan isin $ulist($address($nick,5),cb,1).info) {
    mode $chan +b $nick
    kick $chan $nick Geband op dit kanaal
  }
}

;OPPING/VOICING
on *:JOIN:#:{
  if ($nick != $me) {
    if ($readini(channels.ini,$chan,auto-voice) == on) { mode $chan +v $nick }
    if ($readini(channels.ini,$chan,auto-op) == on) { mode $chan +o $nick }
    if (*o* iswm $readini(channels.ini,$chan,$nick)) { mode $chan +o $nick }
    elseif (*v* iswm $readini(channels.ini,$chan,$nick)) { mode $chan +v $nick }
    if ($readini(channels.ini,$chan,chan_greet)) { notice $nick $readini(channels.ini,$chan,chan_greet) }
    if ($readini(channels.ini,$chan,count) == on) {
      if ($readini(channels.ini,tellers,$chan) != $null) {
        writeini channels.ini tellers $chan [ $calc($readini(channels.ini,tellers,$chan) + 1) ]
      }
      else { writeini channels.ini tellers $chan 1 }
      msg $chan 10 $+ $nick welkom Je bent persoon nr.4 $readini(channels.ini,tellers,$chan) 10die $chan komt bezoeken het is nu01 [4 $asctime(HH:nn) 01]
    }
  }
  if ($readini(channels.ini,$chan,chan_limit)) { timer_limit 1 5 mode $chan +l $calc($nick($chan,0,a) + $readini(channels.ini,$chan,chan_limit)) }
  if ($readini(channels.ini,$chan,peak) == on) {
    _peak.check $chan
  }
}

on *:JOIN:#:{
  if ($nick != $me) {
    if (*b* iswm $readini(channels.ini,$chan,$nick)) { mode $chan +o $nick }
    if ($readini(channels.ini,$chan,auto-voice) == on) { mode $chan +v $nick }
    if ($readini(channels.ini,$chan,auto-op) == on) { mode $chan +o $nick }
    if ($readini(channels.ini,$chan,chan_greet)) { notice $nick $readini(channels.ini,$chan,chan_greet) }
    if ($readini(channels.ini,$chan,count) == on) {
      if ($readini(channels.ini,tellers,$chan) != $null) {
        writeini channels.ini tellers $chan [ $calc($readini(channels.ini,tellers,$chan) + 1) ]
      }
      else { writeini channels.ini tellers $chan 1 }
      msg $chan 10Welkom4 $nick 10Je bent nummer $readini(channels.ini,tellers,$chan) die $chan komt bezoeken het is nu01 [4 $asctime(HH:nn) 01]
    }
  }
  if ($readini(channels.ini,$chan,chan_limit)) { timer_limit 1 5 mode $chan +l $calc($nick($chan,0,a) + $readini(channels.ini,$chan,chan_limit)) }
  if ($readini(channels.ini,$chan,peak) == on) {
    _peak.check $chan
  }
}

;LOGIN
on *:TEXT:login*:?:{
  if ($1 == login) {
    if ($strip($2,burc) === $decode($readini(users.ini,$nick,pass),m)) {
      notice $nick 4login gelukt! Welkom
      if (*n* iswm $readini(users.ini,$nick,flags)) { guser 1000 $nick 5 }
      elseif (*m* iswm $readini(users.ini,$nick,flags)) { guser 500 $nick 5 }
      elseif (*o* iswm $readini(users.ini,$nick,flags)) { guser 250 $nick 5 }
      else { guser 100 $nick 5 }
    }
    else { notice $nick Login gefaald!  Zorg ervoor dat je het goede paswoord hebt! }
  }
}

;PASSWORD ROUTINE
on *:TEXT:pass*:?:{
  if ($2 == $null) { notice $nick zet een paswoord aub ! - /msg $me pass <u gekozen paswoord> }
  elseif ($readini(users.ini,$nick,pass)) {
    notice $nick Je hebt al een paswoord ingesteld!
  }
  elseif (!$readini(users.ini,$nick,pass)) { 
    if ($len($strip($2,burc)) < 6) { notice $nick Je wachtwoord moet minstens 6 karakters hebben! }
    elseif (* [ $+ [ $strip($2,burc) ] $+ ] * iswm $nick) { notice $nick Gebruik een iets moeilijker te raden paswoord. }
    elseif ($islower($strip($2,burc))) { notice $nick Gebruik een iets moeilijker te raden paswoord. }
    elseif ($isupper($strip($2,burc))) { notice $nick Gebruik een iets moeilijker te raden paswoord. }
    else {
      writeini users.ini $nick pass $encode($strip($2,burc),m)
      notice $nick Je paswoord is nu: $strip($2,burc)
    }
  }
}

;COMMAND BLOCK
on *:TEXT:!shortnick:#:{
  notice $nick De afkorting (shortnick) van $me is s.
}

on 100:TEXT:cmd *:#:{
  if ($me !isop $chan) { msg $chan Op mij aub!!!! }
  if ($2 == help) {
    if (!$3) {
      if (*n* iswm $readini(users.ini,$nick,flags)) {
        notice $nick De commando's die je als eigenaar van de bot kunt gebruiken zijn:
        notice $nick OP DEOP VOICE DEVOICE KICK BAN UNBAN BANMASK GBAN PEAK
        notice $nick MODE SAY ACT JOIN PART ADD DEL GREET COUNT LIMIT
        notice $nick AUTO-VOICE AUTO-OP CYCLE DROP MSG BANNER AWAY BACK
        notice $nick NICK DIE RESTART GDEL REHASH
      }
      elseif (*m* iswm $readini(users.ini,$nick,flags)) {
        notice $nick De commando's die je als master van de bot kunt gebruiken zijn:
        notice $nick OP DEOP VOICE DEVOICE KICK BAN UNBAN BANMASK GBAN MODE
        notice $nick SAY ACT JOIN PART ADD DEL GREET COUNT LIMIT AUTO-VOICE
        notice $nick PEAK AUTO-OP CYCLE DROP MSG BANNER AWAY BACK REHASH
      }
      elseif (*o* iswm $readini(users.ini,$nick,flags)) {
        notice $nick De commando's die je als globale operator van de bot kunt gebruiken zijn:
        notice $nick OP DEOP VOICE DEVOICE KICK BAN UNBAN BANMASK GBAN
        notice $nick MODE SAY ACT JOIN PART ADD DEL GREET COUNT LIMIT
        notice $nick PEAK AUTO-VOICE AUTO-OP CYCLE DROP MSG
      }
      elseif (*n* iswm $readini(channels.ini,$chan,$nick)) {
        notice $nick De commando's die je als kanaaleigenaar kunt gebruiken zijn:
        notice $nick OP DEOP VOICE DEVOICE KICK BAN UNBAN BANMASK MODE
        notice $nick SAY ACT JOIN PART ADD DEL GREET COUNT LIMIT CYCLE
        notice $nick PEAK AUTO-VOICE AUTO-OP DROP
      }
      elseif (*m* iswm $readini(channels.ini,$chan,$nick)) {
        notice $nick De commando's die je als kanaalmaster kunt gebruiken zijn:
        notice $nick OP DEOP VOICE DEVOICE KICK BAN UNBAN BANMASK MODE SAY
        notice $nick ACT JOIN PART ADD DEL GREET COUNT LIMIT AUTO-VOICE
        notice $nick AUTO-OP PEAK
      }
      elseif (*o* iswm $readini(channels.ini,$chan,$nick)) {
        notice $nick De commando's die je als kanaaloperator kunt gebruiken zijn:
        notice $nick OP DEOP VOICE DEVOICE KICK BAN UNBAN BANMASK
        notice $nick MODE SAY ACT
      }
      elseif (*v* iswm $readini(channels.ini,$chan,$nick)) {
        notice $nick De commando's die je als kanaalvoice kunt gebruiken zijn:
        notice $nick VOICE DEVOICE
      }
      notice $nick Voor meer info, gebruik help <commando>
    }
    if ($3 == peak) {
      notice $nick Gebruik: peak <on/off>
      notice $nick $me zal een piek voor het kanaal bijhouden.
      notice $nick Deze kan opgevraagd worden met !peak
    }
    if ($3 == op) {
      notice $nick Gebruik: op [nicks]
      notice $nick $me zal [nicks] oppen (max. 3!).  Zonder [nicks] zal de bot jou oppen.
    }
    if ($3 == deop) {
      notice $nick Gebruik: deop [nicks]
      notice $nick $me zal [nicks] deoppen (max. 3!).  Zonder [nicks] zal de bot jou deoppen.
    }
    if ($3 == voice) {
      notice $nick Gebruik: voice [nicks]
      notice $nick $me zal [nicks] voicen (max. 3!).  Zonder [nicks] zal de bot jou voicen.
    }
    if ($3 == devoice) {
      notice $nick Gebruik: devoice [nicks]
      notice $nick $me zal [nicks] devoicen (max. 3!).  Zonder [nicks] zal de bot jou devoicen.
    }
    if ($3 == ban) {
      notice $nick Gebruik: ban <nick>
      notice $nick $me zal <nick> van het kanaal kick-bannen.
    }
    if ($3 == banmask) {
      notice $nick Gebruik: banmask <host>
      notice $nick $me zal <host> permanent bannen.
    }
    if ($3 == unban) {
      notice $nick Gebruik: unban <nick>
      notice $nick $me zal <nick> unbannen.
    }
    if ($3 == gban) {
      notice $nick Gebruik: gban <host>
      notice $nick $me zal op alle kanalen <host> bannen.
    }
    if ($3 == kick) {
      notice $nick Gebruik: kick <nick> <reden>
      notice $nick $me zal <nick> van het kanaal kicken.
    }
    if ($3 == mode) {
      notice $nick Gebruik: mode <modes>
      notice $nick $me zet <modes> op het kanaal.
    }
    if ($3 == say) {
      notice $nick Gebruik: say <tekst>
      notice $nick $me zal <tekst> in het kanaal zeggen.
    }
    if ($3 == act) {
      notice $nick Gebruik: act <tekst>
      notice $nick $me zal <tekst> in het kanaal doen.
    }
    if ($3 == join) {
      notice $nick Gebruik: join <kanaal>
      notice $nick $me zal <kanaal> joinen.
    }
    if ($3 == part) {
      notice $nick Gebruik: part
      notice $nick $me zal het kanaal verlaten.
    }
    if ($3 == add) {
      notice $nick Gebruik: add <nick> <level>
      notice $nick $me zal <nick> toevoegen aan zijn database met <level>.
      notice $nick Mogelijke levels zijn:
      notice $nick owner - master - globalop - chanowner - chanmaster - chanop - chanvoice - chanbot
      notice $nick OPGELET!!! Je kan enkel mensen toevoegen op levels lager dan het jouwe!
    }
    if ($3 == del) {
      notice $nick Gebruik: del <nick>
      notice $nick $me zal <nick> verwijderen uit de KANAALDATABASE!!! (de globale flags blijven staan!)
    }
    if ($3 == gdel) {
      notice $nick Gebruik: gdel <nick>
      notice $nick $me zal <nick> uit ALLE DATABASES verwijderen.
    }
    if ($3 == greet) {
      notice $nick Gebruik: greet <tekst/off>
      notice $nick $me zal binnenkomende chatters groeten met <tekst>.
      notice $nick "greet off" zal deze functie uitschakelen.
    }
    if ($3 == count) {
      notice $nick Gebruik: count <on/off>
      notice $nick $me zal alle binnenkomende chatters al dan niet tellen.
    }
    if ($3 == limit) {
      notice $nick Gebruik: limit <getal/off>
      notice $nick $me zal de limiet op het kanaal telkens met <getal> verhogen. (tegen join floods)
      notice $nick "limit off" zal deze functie uitschakelen.
    }
    if ($3 == auto-voice) {
      notice $nick Gebruik: auto-voice <on/off>
      notice $nick $me zal iedere binnenkomende chatter al dan niet voicen.
    }
    if ($3 == auto-op) {
      notice $nick Gebruik: auto-op <on/off>
      notice $nick $me zal iedere binnenkomende chatter al dan niet oppen.
    }
    if ($3 == cycle) {
      notice $nick Gebruik: cycle
      notice $nick $me zal het kanaal cyclen. (d.w.z. parten en opnieuw joinen)
    }
    if ($3 == drop) {
      notice $nick Gebruik: drop
      notice $nick $me zal het kanaal verwijderen uit zijn database.
    }
    if ($3 == msg) {
      notice $nick Gebruik: msg <nick> <tekst>
      notice $nick $me zal <nick> het bericht <tekst> privé zenden.
    }
    if ($3 == banner) {
      notice $nick Gebruik: banner <tekst>
      notice $nick $me zal <tekst> op ieder kanaal zeggen.
    }
    if ($3 == away) {
      notice $nick Gebruik: away <reden>
      notice $nick $me zal zich als weg instellen.
    }
    if ($3 == back) {
      notice $nick Gebruik: back
      notice $nick $me zal zich niet meer als weg instellen.
    }
    if ($3 == nick) {
      notice $nick Gebruik: nick <nick>
      notice $nick $me zal zijn nick veranderen naar <nick>
    }
    if ($3 == die) {
      notice $nick Gebruik: die [reden]
      notice $nick $me zal disconnecten met [reden]
    }
    if ($3 == restart) {
      notice $nick Gebruik: restart
      notice $nick $me zal zichzelf opnieuw starten.
    }
    if ($3 == rehash) {
      notice $nick Gebruik: rehash
      notice $nick $me zal zijn databases opnieuw laden.
    }
  }
  if ($2 == op) {
    if (*o* iswm $readini(users.ini,$nick,flags) || *o* iswm $readini(channels.ini,$chan,$nick)) {
      if (!$3) { mode $chan +o $nick }
      else { mode $chan +ooo $3- }
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == deop) {
    if (*o* iswm $readini(users.ini,$nick,flags) || *o* iswm $readini(channels.ini,$chan,$nick)) {
      if (!$3) { mode $chan -o $nick }
      else { mode $chan -ooo $3- }
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == voice) {
    if (*o* iswm $readini(users.ini,$nick,flags) || *v* iswm $readini(channels.ini,$chan,$nick)) {
      if (!$3) { mode $chan +v $nick }
      elseif (*o* iswm $readini(users.ini,$nick,flags) || *o* iswm $readini(channels.ini,$chan,$nick)) { mode $chan +vvv $3- }
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == devoice) {
    if (*v* iswm $readini(users.ini,$nick,flags) || *o* iswm $readini(channels.ini,$chan,$nick)) {
      if (!$3) { mode $chan -v $nick }
      elseif (*o* iswm $readini(users.ini,$nick,flags) || *o* iswm $readini(channels.ini,$chan,$nick)) { mode $chan -vvv $3- }
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == kick) {
    if (*o* iswm $readini(users.ini,$nick,flags) || *o* iswm $readini(channels.ini,$chan,$nick)) {
      kick $chan $3 Gekickt door $nick $+ : $4-
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == ban) {
    if (*o* iswm $readini(users.ini,$nick,flags) || *o* iswm $readini(channels.ini,$chan,$nick)) {
      ban -u600 $chan $3 5
      kick $chan $3 Geband door $nick $+ ! (10 minuten)
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == unban) {
    if (*o* iswm $readini(users.ini,$nick,flags) || *o* iswm $readini(channels.ini,$chan,$nick)) {
      mode $chan -b $address($3,5)
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == banmask) {
    if (*o* iswm $readini(users.ini,$nick,flags) || *o* iswm $readini(channels.ini,$chan,$nick)) {
      if ($left($3,1) !=== -) {
        mode $chan +b $3
        auser -a cb $3 $chan
        notice $nick $3 is toegevoegd aan de lijst met permanente bans voor dit kanaal.
        notice $nick Om deze te verwijderen typ je i banmask - $+ $3
      }
      if ($left($3,1) === -) {
        mode $chan -b $right($3,-1)
        ruser cb $right($3,-1)
        notice $nick $right($3,-1) is uit de lijst met permanente bans voor dit kanaal verwijderd.
      }
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == gban) {
    if (*o* iswm $readini(users.ini,$nick,flags)) {
      if ($left($3,1) !=== -) {
        var %gban.chan $chan(0)
        while (%gban.chan > 0) {
          mode $chan(%gban.chan) +b $3
        }
        auser -a gb $3
        notice $nick $3 is toegevoegd aan de lijst met global bans.
        notice $nick Om deze te verwijderen typ je i gban - $+ $3
      }
      if ($left($3,1) === -) {
        mode $chan -b $right($3,-1)
        ruser gb $right($3,-1)
        notice $nick $right($3,-1) is uit de lijst met permanente global bans verwijderd.
      }
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == mode) {
    if (*o* iswm $readini(users.ini,$nick,flags) || *o* iswm $readini(channels.ini,$chan,$nick)) {
      mode $chan $3-
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == say) {
    if (*o* iswm $readini(users.ini,$nick,flags) || *o* iswm $readini(channels.ini,$chan,$nick)) {
      msg $chan $3-
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == act) {
    if (*o* iswm $readini(users.ini,$nick,flags) || *o* iswm $readini(channels.ini,$chan,$nick)) {
      describe $chan $3-
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == join) {
    if (*m* iswm $readini(users.ini,$nick,flags) || *m* iswm $readini(channels.ini,$chan,$nick)) {
      join $3
      if ($3) { join $3 $nick heeft me naar hier gebracht! }
      if (!$3) { join $chan $nick heeft me naar hier gebracht! }

    }
    else { notice $nick Geen toegang tot dit commando. }
  }
  if ($2 == part) {
    if (*m* iswm $readini(users.ini,$nick,flags) || *m* iswm $readini(channels.ini,$chan,$nick)) {
      if ($3) { part $3 $nick heeft me weggejaagd! }
      if (!$3) { part $chan $nick heeft me weggejaagd! }
    }
    else { notice $nick Geen toegang tot dit commando. }
  }
  if ($2 == peak) {
    if (*m* iswm $readini(users.ini,$nick,flags) || *m* iswm $readini(channels.ini,$chan,$nick)) {
      if ($3- == on || $3- == off) {
        writeini channels.ini $chan peak $3
        if ($3- == on) { notice $nick $me zal nu voor jouw de piek bijhouden! | writeini channels.ini $chan peak.height $nick($chan,0) | writeini channels.ini $chan peak.time $ctime }
        if ($3- == off) { notice $nick $me zal nu voor jouw de piek niet meer bijhouden. }
      }
      else { notice $nick Niet genoeg parameters.  Gebruik: peak <on/off> }
    }
    else { notice $nick Geen toegang tot dit commando. }
  }
  if ($2 == add) {
    if (*n* iswm $readini(users.ini,$nick,flags)) {
      if ($4 == master) { writeini users.ini $3 flags mo | addnotice $nick $3 $4 }
      if ($4 == owner) { writeini users.ini $3 flags nmo | addnotice $nick $3 $4 }
    }
    if (*m* iswm $readini(users.ini,$nick,flags) || *m* iswm $readini(channels.ini,$chan,$nick)) {
      if ($4 == globalop && *m* iswm $readini(users.ini,$nick,flags)) { writeini users.ini $3 flags o | addnotice $nick $3 $4 }
      if ($4 == chanowner && *m* iswm $readini(users.ini,$nick,flags)) { writeini channels.ini $chan $3 nmov | addnotice $nick $3 $4 }
      if ($4 == chanmaster) {
        if (*n* iswm $readini(channels.ini,$chan,$nick) || *m* iswm $readini(users.ini,$nick,flags)) {
          writeini channels.ini $chan $3 mov
          addnotice $nick $3 $4
        }
      }
      if ($4 == chanop) { writeini channels.ini $chan $3 ov | addnotice $nick $3 $4 }
      if ($4 == chanvoice) { writeini channels.ini $chan $3 v | addnotice $nick $3 $4 }
      if ($4 == chanbot) { writeini channels.ini $chan $3 b | notice $nick $3 is nu als $4 toegevoegd. | halt }
      if (chan* iswm $4) {
        if (!$read(levels.txt,w,* [ $+ [ $chan ] ])) { write -il3 levels.txt join [ $chan ] }
      }
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == del) {
    if (*m* iswm $readini(users.ini,$nick,flags) || *m* iswm $readini(channels.ini,$chan,$nick)) {
      if (*m* iswm $readini(users.ini,$3,flags) || *n* !iswm $readini(users.ini,$nick,flags)) { notice $nick Je kan geen master of eigenaar uit de kanaaldatabase verwijderen. }
      else { remini channels.ini $chan $3 | notice $nick $3 is nu verwijderd uit de kanaaldatabase. }
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == greet) {
    if (*m* iswm $readini(users.ini,$nick,flags) || *m* iswm $readini(channels.ini,$chan,$nick)) {
      if ($3- != off) {
        writeini channels.ini $chan chan_greet $3-
        notice $nick De groet voor $chan is nu: $3-
        notice $nick Om deze uit te schakelen gebruik je: greet off
      }
      if ($3- == off) {
        remini channels.ini $chan chan_greet
        notice $nick De groet voor $chan is nu uitgeschakeld!
      }
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == count) {
    if (*m* iswm $readini(users.ini,$nick,flags) || *m* iswm $readini(channels.ini,$chan,$nick)) {
      if ($3 == on || $3 == off) {
        writeini channels.ini $chan count $3
        notice $nick De teller voor $chan staat nu: $3
      }
      else { notice $nick Gebruik: count <on/off> }
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == limit) {
    if (*m* iswm $readini(users.ini,$nick,flags) || *m* iswm $readini(channels.ini,$chan,$nick)) {
      if ($3 == off) {
        remini channels.ini $chan chan_limit
        notice $nick De limiet voor $chan is nu uitgeschakeld.
        mode $chan -l
      }
      elseif ($3 >= 1) {
        writeini channels.ini $chan chan_limit $3
        notice $nick De limiet voor $chan zal telkens $3 hoger zijn dan het aantal aanwezigen.
      }
      else { notice $nick Gebruik: limit <getal> (HOGER DAN 1!) }
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == auto-voice) {
    if (*m* iswm $readini(users.ini,$nick,flags) || *m* iswm $readini(channels.ini,$chan,$nick)) {
      if ($3 == on || $3 == off) {
        writeini channels.ini $chan auto-voice $3
        notice $nick De auto-voice voor $chan staat nu: $3
      }
      else { notice $nick Gebruik: auto-voice <on/off> }
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == auto-op) {
    if (*m* iswm $readini(users.ini,$nick,flags) || *m* iswm $readini(channels.ini,$chan,$nick)) {
      if ($3 == on || $3 == off) {
        writeini channels.ini $chan auto-op $3
        notice $nick De auto-op voor $chan staat nu: $3
      }
      else { notice $nick Gebruik: auto-op <on/off> }
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == cycle) {
    if (*m* iswm $readini(users.ini,$nick,flags) || *n* iswm $readini(channels.ini,$chan,$nick)) {
      hop $chan Rejoin gevraagd door $nick
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == drop) {
    if (*m* iswm $readini(users.ini,$nick,flags) || *n* iswm $readini(channels.ini,$chan,$nick)) {
      remini channels.ini $chan
      notice $nick Het kanaal $chan is nu verwijderd uit mijn database!  Nog veel plezier!
      part $chan Kanaal verwijderd door $nick
      write -dw-* [ $+ [ $chan ] ] levels.txt
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == msg) {
    if (*o* iswm $readini(users.ini,$nick,flags)) { msg $3- | notice $nick Bericht verzonden }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == banner) {
    if (*m* iswm $readini(users.ini,$nick,flags)) {
      var %temp.channum $chan(0)
      while (%temp.channum > 0) {
        msg $chan(%temp.channum) $3-
        dec %temp.channum
      }
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == away) {
    if (*m* iswm $readini(users.ini,$nick,flags)) {
      away $3-
      notice $nick Ik sta nu op "weg".
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == back) {
    if (*m* iswm $readini(users.ini,$nick,flags)) {
      away
      notice $nick Ik sta nu op "terug".
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == nick) {
    if (*n* iswm $readini(users.ini,$nick,flags)) {
      tnick $3
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == die) {
    if (*n* iswm $readini(users.ini,$nick,flags)) {
      quit $3-
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == restart) {
    if (*n* iswm $readini(users.ini,$nick,flags)) {
      server irc.krey.net
    }
    else { notice $nick Geen toegang tot dit commando }
  }
  if ($2 == gdel) {
    if (*n* iswm $readini(users.ini,$nick,flags)) {
      remini users.ini $3
      notice $nick $3 is nu verwijderd uit de database.
    }
    else { notice $nick Geen toegang tot dit commando }
  }
}

alias _peak.check {
  if ($nick($1,0) > $readini(channels.ini,$1,peak.height)) {
    set %last.peak. [ $+ [ $1 ] ] $readini(channels.ini,$1,peak.time)
    writeini channels.ini $1 peak.height $nick($1,0)
    writeini channels.ini $1 peak.time $ctime
    msg $1 Ja, er is een nieuwe piek op dit kanaal!
    msg $1 Piek van $1 is nu $readini(channels.ini,$1,peak.height) chatters.
    if (%last.peak. [ $+ [ $1 ] ]) { msg $1 De vorige piek dateert van $asctime(%last.peak. [ $+ [ $1 ] ],dd mmm yyyy) om $asctime(%last.peak. [ $+ [ $1 ] ],HH:nn:ss) $+ . }
  }
}

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.