ircN for mIRC — File Browser

ircNformIRCv6.0 / ircNformIRCv6.0 / ircn / SYSTEM / events.mrc

events.mrc — 28.94 KB — Download this file

on 1:INVITE:* {
  if ($ulevel >= 80) {
    if ($form(other,inviteajoin)) iecho $readini %formats other inviteajoin
    else iecho Autojoining $hc($chan) by the request of $hc($nick) ( $+ $sc($address) $+ ) $ul($ulevel)
    join $chan
  }
  else {
    if ($form(other,invite)) iecho $readini %formats other invite
    else iecho 10invite request to14:[6 $+ $chan $+ 14]:10 $nick14(10 $+ $address $+ 14) ..
    if ((%f11 == on) && (%func == on)) {
      set %f11 off
      .timer 1 7 set %f11 on
      set %kkchan j $chan
      set %kchan ckb $nick %ckb
      if ($comchan($nick,1).op) {
        if ($form(other,inviteopjoin)) {
          iecho $readini %formats other inviteopjoin
          if ($form(other,inviteopjoin2)) iecho $readini %formats other inviteopjoin2
        }
        else iecho 14..6tew join14 $chan 6press14 f11 $+ . 6to kickban press14 f12 $+ .
      }
      else {
        if ($form(other,invitejoin)) {
          iecho $readini %formats other invitejoin
          if ($form(other,invitejoin2)) iecho $readini %formats other invitejoin2
        }
        else iecho 14..6tew join14 $chan 6press14 f11 $+ .
      }
    }
  }
  tsound invite
}

on 1:CTCPREPLY:ping* { 
  if ($nick == $me) { halt } 
}
on 1:START {
  set %dir $left($mircdir,$sub($len($mircdir),8))
  titlebar $chr(91) Not Connected $chr(93) $chr(91) $strip(%ver) $chr(93)
  .ddeserver on ircN
  .disable #www #mail #sendmail #holdtopic
  inc %uses
  remfiles
  verset
  isunset
  .creq %creq
  vbcheck hide
  .sreq %sreq
  deltemp
  if (($script(irc2.mrc)) && ($alias(irc2.als))) { .unload -rs irc2.mrc | .unload -a irc2.als | set %irc2 off }
  if ($script(idos.mrc)) .unload -rs idos.mrc
  if ($script(help.mrc)) .unload -rs help.mrc
  if ($script(itelnet.mrc)) .unload -rs itelnet.mrc
  if ($script(icontrol.mrc)) .unload -rs icontrol.mrc
  if (%uses == 1) .play -cstircNsetup $td(util.txt) 120
  tsound welcome
}
on 1:CONNECT {
  titlebar $chr(91) Connected... initializing $chr(93) $chr(91) $strip(%ver) $chr(93)
  .mode $me %umode
  .rlevel 30
  .rlevel 100
  if (%delogs == connect) delog -q
  set %backtime $ctime
  set %chandump off
  set %jstats off
  set %f11 on
  set %f12 on
  .guser 100 $me 0
  .timer1 0 60 online
  .timer2 0 3 tb
  if (%hideping == on) {
    .timer 0 30 .quote pong $server $server
    set %pingtimer $ltimer
  }
  if (%uses == 1) set %rircN y
  else unset %rircN
  if ($window(@iclock)) window -c @iclock
  if (%lag != n/a) set %lag 0
  if ((%rejoin == on) && ($lines($tp(rejoin.chn)) > 1)) .play -cs $tp(rejoin.chn)
  elseif ($lines($sys(autojoin.txt)) >= 1) .play -cs $sys(autojoin.txt) 0
  if (($exists($tp(rejoin.chn))) && (%rejoin != on)) remove $tp(rejoin.chn)
  iunset
  wcln
  cclr
  online
  tsound connect
}
on 1:TEXT:*:?:{
  /set %redirect $1- | set %redirect2 $address($nick,5)
  if %away.log == On { /if %away == On { /pub.msg you are away -- message logged. | /.notice $nick %Logo1 $me is away, msg logged. try /ctcp $me help | /.timer 1 01 /.closemsg $nick | /write $mircdir $+ text\awaylog.txt $nick --> $parms | inc %away.logged.msgs 1 } }
  if %displaymsg == On { /set %tmpdisplaynick $nick | /echo 2 -a 14[10msg $+ %creed.color $+ 14!6 $+ $nick14(6 $+ $address14)]8 $parms
  if %killwindow == On { halt } }
}
on 1:CHAT:* {
  if ($findtok(%remote.cnicks,$nick,32)) {
    if ($1 == .rcpass) {
      if ($2) set %rcpass $2
      else rc.relay %h Syntax: .rcpass <new password>
    }
    if (($1 != connect) && ($left($1,8) != $ret(dcc chat)) && ($1 != help)) {
      if ((($1 == msg) || ($1 == m)) && ($2 ischan)) {
        msg $2-
        rc.relay [msg( $+ $2 $+ )] $3-
      }
      elseif ((($1 == s) || ($1 == say)) && ($me ison #$$2)) {
        msg #$$2 $3-
        rc.relay $chr(91) $+ $me $+ : $+ #$$2 $+ $chr(93) $3-
      }
      else $1-
    }
  }
}
on 1:TEXT:*:? {
  if (%remote.cnicks) {
    if (($active == $nick) || (%actmsg != on) || (=Window == $active)) rc.relay $chr(91) $+ $hc($nick) $+ : $+ $sc($address) $+ $chr(93) $1-
  }
}
on 1:TEXT:*:# {
  if (%remote.cnicks) rc.relay ( $+ $nick $+ : $+ $chan $+ ) $1-
}
on 1:JOIN:# { 
  if $nick == $me { /set %synk %synk. [ $+ [ $chan ] ] | if %synk == $null { /set %synk ? | goto d } | /set %synk $ticks - %synk | if $len(%synk) > 3 { /set %synk $remove(%synk,$right(%synk,3)) $+ . $+ $right(%synk,3) } | else /set %synk 0. $+ %synk | :d | /echo 2 $chan 14_15_16[9join 16_15)14: $nick has joined channel $chan $+ . (synched in: %synk secs) | /unset %synk. [ $+ [ $chan ] ] %synk | /if %cycle == $chan unset %cycle | goto e }
  /set %tmp $nick $+ ! $+ $address | /set %tmp2 $readini $mircdir $+ system\h-users.ini $mask(%tmp,3) chan
  if (($chan isin %tmp2) || (%tmp2 == all)) { /set %tmp $readini $mircdir $+ system\h-users.ini $mask(%tmp,3) mode
    /echo 14 $chan 16:15:14: (15join1515:16 $+ $chan15)16  $nick 15has joined the channel..
    if o isin %tmp { if ((%AutoOps == on) && ($me isop $chan)) { /mode $chan +o $nick } }
    if b isin %tmp { if $me isop $chan { /bk $nick %Def.ABKickMSG } }
    goto e
  }
  /echo 2 $chan 16:15:14: (7join1514:10 $+ $chan14)15  $nick 14has joined the channel..
  :e | /set %LastJoin $nick | /unset %tmp %tmp2
}
on 1:PART:# {
  if (($nick == $me) && (%cycle == $chan)) { /.timer 1 1 /join $chan | goto e }
  /set %tmp $nick $+ ! $+ $address | /set %tmp2 $readini $mircdir $+ system\h-users.ini $mask(%tmp,3) chan
  if (($chan isin %tmp2) || (%tmp2 == all)) { /set %tmp $readini $mircdir $+ system\h-users.ini $mask(%tmp,3) mode
    /echo 14 $chan 16:15:14: (15part:16 $+ $chan15)16 $nick 15has left the channel..
    goto e
  }
  /echo 2 $chan 16:15:14: (7part14:10 $+ $chan14)15 $nick 14has left the channel..
  :e | /unset %tmp %tmp2
}
on 1:KICK:# {
  /set %tmp $nick $+ ! $+ $address | /set %tmp2 $readini $mircdir $+ system\h-users.ini $mask(%tmp,3) chan
  if (($chan isin %tmp2) || (%tmp2 == all)) { /set %tmp $readini $mircdir $+ system\h-users.ini $mask(%tmp,3) mode
    if i isin %tmp { /raw -q INVITE $knick $chan |  ;10net $knick was kicked by $nick on $chan ( $+ $parms $+ ) }
    /echo ..(one: $+ $chan).. $knick was kicked by $nick on $chan ( $+ $parms $+ ) 
    goto e
  } 
  : e | /unset %tmp %tmp2
  ; .iecho $knick was kicked by $nick on $chan ( $+ $parms $+ )
}
on 1:SERVEROP:# {
  /set %tmp $nick $+ ! $+ $address | /set %tmp2 $readini $mircdir $+ system\h-users.ini $mask(%tmp,3) chan
  if (($chan isin %tmp2) || (%tmp2 == all)) { /set %tmp $readini $mircdir $+ system\h-users.ini $mask(%tmp,3) mode
    if b isin %tmp { if $me isop $chan { /bk $nick %Def.ABKickMSG } }
    goto e
  }
  if %NetHackProt == on { as.echo 2 14(12 nethack 15)14 removing ops from $nick on $chan $+ . | /mode $chan -o $opnick | ; 10net nethack on $chan by $nick ( $+ $address $+ ) }
  :e | /unset %tmp %tmp2
}
on 1:OP:# {
  /set %tmp $opnick $+ ! $+ $address | /set %tmp2 $readini $mircdir $+ system\h-users.ini $mask(%tmp,3) chan
  if (($chan isin %tmp2) || (%tmp2 == all)) { /set %tmp $readini $mircdir $+ system\h-users.ini $mask(%tmp,3) mode
    if b isin %tmp { if $me isop $chan { /bk $opnick %Def.ABKickMSG } }
    goto e
  }
  if %DunnoOpProt == on { /echo 2 14(12 bitch 15)14 removing ops from $nick on $chan $+ . | /mode $chan -o $opnick }
  :e | unset %tmp %tmp2
}
on 1:TEXT:# {
  /set %tmp $nick $+ ! $+ $address | /set %tmp2 $readini $mircdir $+ system\h-users.ini $mask(%tmp,3) chan
  if (($chan isin %tmp2) || (%tmp2 == all)) { /set %tmp $readini $mircdir $+ system\h-users.ini $mask(%tmp,3) mode
    if b isin %tmp { if $me isop $chan { /bk $nick %Def.ABKickMSG } }
    goto e
  }
  :e | /unset %tmp %tmp2
}
;
Neat Stuff
on 1:INPUT {
  if (((%NickC == 0) || ($left(1,$1) != %NickC.Trig) || (# == $null))) goto e
  /nickcomp $remove($1,%NickC.Trig) *2
  :e
}
on 1:TEXT:XDCC SEND*:? {
  /if %xdcc == on { if $parm3 == $null goto e | /set %XDCC.Req $parm3 | /set %XDCC.Req $remove(%XDCC.Req,%NB) | /if %XDCC.Req > %XDCC.Files { /.notice $nick %H_Logo invalid file number! | /unset %XDCC.Req | /halt } | /if %XDCC.Pass. [ $+ [ %XDCC.Req ] ] != 0 { if $parm4 != %XDCC.Pass. [ $+ [ %XDCC.Req ] ] { /.notice $nick %H_Logo password required! | /unset %XDCC.Req | /halt } }
    m.echoa ( $+ $nick $+ 15!14 $+ $address $+ ) requested send of XDCC File %NB $+ %XDCC.Req
  /.notice $nick %H_Logo now sending you: %XDCC.Desc. [ $+ [ %XDCC.Req ] ] ( $+ %XDCC.Size. [ $+ [ %XDCC.Req ] ] $+ ) | /inc %XDCC.Gets. [ $+ [ %XDCC.Req ] ] 1 | /dcc send $nick %XDCC.File. [ $+ [ %XDCC.Req ] ] | /unset %XDCC.Req | :e | /close -m $nick } 
}
on 1:TEXT:XDCC LIST:? {
  /if %xdcc == on { /m.ctcpwho | m.echoa ( $+ $nick $+ 15!14 $+ $address $+ ) XDCC LIST to %tmp detected. (replied) | if $site == %LastXDCC { inc %LastXDCC_T 1 | if %LastXDCC_T >= 3 { ignore -tu $+ %Ignore.Time $wildsite | /set %LastXDCC 0 | /set %LastXDCC_T 0 | m.echoa flood protection (xdcc list) triggered by $nick 15(14 $+ $address $+ 15) } } | if $site != %LastXDCC { set %LastXDCC $site | set %LastXDCC_T 1 }
  /if %XDCC.Files == 0 { /.notice $nick %H_Logo sorry, no files are being offered. | /halt } | /xoffer /.notice $nick }
}
on 1:NOTIFY:inc %Notify 1 | /userhost $nick
on 1:CHAT:Enter Your Password.:/m.botadr $nick | /msg = $+ $nick $readini $mircdir $+ system\bots.ini $nick pass
on 1:TEXT:~*:?:ion 1:CHATCLOSE {
  if ($findtok(%remote.cnicks,$nick,32)) {
    if ($remtok(%remote.cnicks,$nick,32) == $null) unset %remote.cnicks
    else set %remote.cnicks $remtok(%remote.cnicks,$nick,32)
  }
}
alias rc.relay {
  if (%remote.cnicks) {
    set %rcloops 0
    :start
    inc %rcloops
    msg = $+ $gettok(%remote.cnicks,%rcloops,32) $strip($1-)
    if (%rcloops < $count(%remote.cnicks,$chr(32))) goto start
    unset %rcloops
  }
}

on 1:DISCONNECT {
  titlebar $chr(91) not cOnnected $chr(93) $chr(91) $strip(%ver) $chr(93)
  if ((%rejoin == on) && (%volontary != y)) savechans
  unset %volontary
  .timers off
  tsound disconnect
}
on 1:INPUT {
  if ((%nc == on) && (%nch isin $1) && ($chr(31) !isin $1) && ($left($1,1) != /) && ($chr(40) !isin $1) && ($chr(41) !isin $1) && ($left($1,1) != %nch) && ($active != @iDOS)) {
    if ($ialchan( [ [ $remove($1,%nch) $+ ] * ] ,$active,1).nick) {
      if ($ialchan( [ [ $remove($1,%nch) $+ ] * ] ,$active,1).nick != $me) say %nlb $+ $ialchan( [ [ $remove($1,%nch) $+ ] * ] ,$active,1).nick $+ %nrb $2-
      elseif ($ialchan( [ [ $remove($1,%nch) $+ ] * ] ,$active,2).nick) say %nlb $+ $ialchan( [ [ $remove($1,%nch) $+ ] * ] ,$active,2).nick $+ %nrb $2-
      else say $1-
      halt
    }
    else {
      say $1-
      halt
    }
  }
}
on 1:JOIN:# {
  if (%bt.dont.trigger == on) {
    inc %bt.dont.trigger.joins
    $timoff(%bt.dont.timer,bt.dont.timer)
    if (%bt.dont.trigger.joins >= $pls($sub(%numsplitnicks,%bt.maxjoins),1)) { unset %bt.dont.trigger %bt.dont.trigger.joins | $timoff(%bt.dont.timer2,bt.dont.timer2) }
    else { .timer 1 10 unset %bt.dont.trigger.joins | set %bt.dont.timer $ltimer }
  }
  if (($nick == $me) && ($chan isin $botchans)) { set %joinedchans %joinedchans $chan }
  if (%colnick == on) colupdt $chan $nick
  if ((%rircn) && ($chan == #ircN) && ($nick == $me)) {
    set %kkchan rjircn
    iecho To remove $hc(#ircN) from autojoin. Press $hc(F11) now.
    unset %rircn
  }
  if ((%auto == on) && ($nick != $me)) {
    if ($readini -n $td(autoplay.txt) $chan notice) .quote notice $nick : $+ $readini $td(autoplay.txt) $chan notice
    if ($readini -n $td(autoplay.txt) $chan msg) .quote privmsg $nick : $+ $readini $td(autoplay.txt) $chan msg
    if ($readini -n $td(autoplay.txt) $chan ctcp) .quote privmsg $nick : $+ $readini $td(autoplay.txt) $chan ctcp $+ 
  }
  if ($ulevel >= 80) {
    if ((%seenbot == on) && ($usr($nick))) writeini $sys(ircndata.ini) $usr($nick) seen $ctime
    if ((%info == on) && ($nick != $me) && ($infoline($nick,$address))) {
      if (($findtok(%infochans,$chan,44)) || (%infochans == all)) msg $chan %lb $+ $nick $+ %rb $infoline($nick,$address)
    }
    if (($me isop $chan) && ($atop($nick,$chan) == 1)) {
      if (%opbot == on)  mode $chan +o $nick
      elseif ((%opbot == off) && (%f11 == on) && (%func == on)) {
        set %f11 off
        .timer 1 5 set %f11 on
        set %kkchan mode $chan +o $nick
        if ((%ircii != on) && (%userjoin == on)) {
          if ($chan != $active) {
            if ($form(userlist,chanopjoin)) iecho $readini %formats userlist chanopjoin
            else iecho $hc($nick) ( $+ $sc($address) $+ ) has joined $hc($chan) $+ . $ul($ulevel)
          }
          if ($form(userlist,opjoin)) iecho $readini %formats userlist opjoin
          else iecho To op $hc($nick) press $hc(F11) $+ .
        }
      }
    }
  }
  elseif (($ulevel == 60) || ($ulevel == 70)) {
    if ((%seenbot == on) && ($usr($nick))) writeini $sys(ircndata.ini) $usr($nick) seen $ctime
    if ((%info == on) && ($nick != $me) && ($infoline($nick,$address))) {
      if (($findtok(%infochans,$chan,44)) || (%infochans == all)) msg $chan %lb $+ $nick $+ %rb $infoline($nick,$address)
    }
    if (($me isop $chan) && ($atop($nick,$chan) == 1)) {
      if (%autoop == on) mode $chan +o $nick
      elseif ((%autoop == off) && (%f11 == on) && (%func == on)) {
        set %f11 off
        .timer 1 5 set %f11 on
        set %kkchan mode $chan +o $nick
        if ((%ircii != on) && (%userjoin == on)) {
          if ($chan != $active) {
            if ($form(userlist,chanopjoin)) iecho $readini %formats userlist chanopjoin
            else iecho $hc($nick) ( $+ $sc($address) $+ ) has joined $hc($chan) $+ . $ul($ulevel)
          }
          if ($form(userlist,opjoin)) iecho $readini %formats userlist opjoin
          else iecho To op $hc($nick) press $hc(F11) $+ .
        }
      }
    }
  }
  elseif ($ulevel == 45) {
    if ($me isop $chan) mode $chan +v $nick
    if ((%info == on) && ($nick != $me) && ($infoline($nick,$address))) {
      if (($findtok(%infochans,$chan,44)) || (%infochans == all)) msg $chan %lb $+ $nick $+ %rb $infoline($nick,$address)
    }
    if ((%seenbot == on) && ($usr($nick))) writeini $sys(ircndata.ini) $usr($nick) seen $ctime
  }
  elseif ($ulevel == 40) {
    if (($me isop $chan) && ($atv($nick,$chan) == 1)) mode $chan +v $nick
    if ((%info == on) && ($nick != $me) && ($infoline($nick,$address))) {
      if (($findtok(%infochans,$chan,44)) || (%infochans == all)) msg $chan %lb $+ $nick $+ %rb $infoline($nick,$address)
    }
    if ((%seenbot == on) && ($usr($nick))) writeini $sys(ircndata.ini) $usr($nick) seen $ctime
  }
  elseif (($ulevel == 20) && ($sd($nick,$chan) == 1)) {
    mode $chan +b $maddress($addie($nick,$address)))
    .quote kick $chan $nick : $+ $readini $sys(ircndata.ini) $maddress($addie($nick,$address))) reason
  }
}
on 1:QUIT {
  /unset %TChan %DChan %SChan
  /set %TChan $channel(0) | /set %DChan 1 | :ChanLoop | /set %SChan $channel(%DChan) | /if $nick ison %SChan /echo %SChan  $+ %creed.color $+ 14.:15% 14[ 7s10ignoff14/10 %SChan 14]15 $nick 14(6 $+ $parms $+ 14) | /inc %DChan 1 | /if %DChan <= %TChan goto ChanLoop | /unset %TChan %DChan %SChan
  if (($ulevel >= 40) && ($usr($nick))) writeini $sys(ircNdata.ini) $usr($nick) quit $1-
  if ((%autocycle == on) && ($nick($chan,0) == 1) && ($me ison $chan) && ($me !isop $chan)) { set %autocycle.chan $chan | .quote part $chan $lf join $chan }
  if (%netsplit == on) {
    if (($3) || ($2 == $null) || (  isin $1-) || (. !isin $2) || (. !isin $1) || (ircII* iswm $1)) halt
    elseif (($1 == %split11) && ($2 == %split22)) {
      ns.nick $nick [ $1 ] $+ & $+ [ $2 ]
      inc %numsplitnicks
      if (%numsplitnicks > %bt.maxjoins) {
        set %bt.dont.trigger on
        .timer 1 900 unset %bt.dont.trigger
        $timoff(%bt.dont.timer2,bt.dont.timer2)
        set %bt.dont.timer2 $ltimer
      }
    }
    elseif ((irc* iswm $1) || (irc* iswm $2) || (.com isin $1) || (.com isin $2) || (.net isin $1) || (.net isin $2) || (.edu isin $1) || (.edu isin $2) || (.Org isin $1) || (.Org isin $2)) {
      set %split11 $1
      set %split22 $2
      set %split2 $replace($2,*,irc)
      set %kkchan wholeft
      ns.serv $1 $2
      ns.nick $nick [ $1 ] $+ & $+ [ $2 ]
      if ($form(other,split)) {
        iecho $readini %formats other split
        if ($form(other,split2)) iecho $readini %formats other split2
        if ($form(other,split3)) iecho $readini %formats other split3
        if ($form(other,split4)) iecho $readini %formats other split4
      }
      else {
        iecho 15n14ETSPLIT 15d14etected (15(16 $+ $atime15!16 $+ $1- $+ 15)14)
      }
      if ($bitver == 32) {
        writeini split.ini mIRC host split2SERVER: $+ [ %split2 ] $+ :6667
        set %kchan run $sys(mirc32.exe) split.ini
        if ($form(other,splitjoin)) {
          iecho $readini %formats other splitjoin
          if ($form(other,splitjoin2)) iecho $readini %formats other splitjoin2
        }
        else iecho 14...to join split 16(15 $+ %split2 $+ 16)14 press F12 --
      }
      .timer 1 240 wcln
      tsound split
    }
    else halt
  }
  halt
  };
  
  on 1:CTCPREPLY:ping* {
    if ($nick == $me) { halt }
    set %pt $abs($round($div($sub($ticks,$2),1000),2))
    if ($2 isnum) {
    if (($nick == $me){ halt }
    if (%pt <= 0) set %lag 0
    else set %lag $round(%pt,2)
  }
  elseif ($2 == $null) {
    unset %pt
    return
  }
  elseif  (%showctcp != on) {
    echo $gettok($rini($sys(mirc.ini),colours,n0),3,44) -s $chr(91) $+ $nick PING reply $+ $chr(93) $+ : $iduration(%pt)
  }
  elseif (%pt <= 0) {
    if ($form(ctcpreplies,ping0)) iecho $readini %formats ctcpreplies ping0
    else iecho CTCP $hc(PING) $sc(reply) from  $+ $hc($nick) $+ : 0 seconds
  }
  elseif ($form(ctcpreplies,ping)) iecho $readini %formats ctcpreplies ping
  else iecho CTCP $hc(PING) $sc(reply) from  $+ $hc($nick) $+ : $iduration(%pt)
}
unset %pt
halt
}
on 1:CTCPREPLY:* {
iecho 15>> [16ctcpreply15(16 $+ $115)] 14:::15 $nick:10 $2-
halt
}
;iecho 15[16ctcpreply15(16 $+ $115)] 14:15:14:16 $nick15:10 $2-
on @1:BAN:# {
if (($level($banmask) >= 50) && (%pfban == on) && ($nick != $me)) {
  mode $chan -b $banmask
  .quote notice $nick :That hostmask is protected, please do not ban it.
}
elseif ((%protect == on) && ($nick != $me) && ($protlvl($gettok($ialchan($banmask,$chan,1),1,33),$chan) >= 1)) {
  if ((%protdeop == on) && ($atop($nick,$chan) == 0) && ($protlvl($gettok($ialchan($banmask,$chan,1),1,33),$chan) >= 2)) mode $chan -bo $banmask $nick
  else mode $chan -b $banmask
  .quote notice $nick :Sorry, but that hostmask is protected.
}
elseif ((%f11 == on) && (%func == on) && ($nick != $me)) {
  set %f11 off
  .timer 1 7 set %f11 on
  set %kkchan mode $chan -b $banmask
  if ((%ircii != on) && ($chan != $active)) {
    if ($form(other,chanban)) iecho $readini %formats other chanban
    else iecho 15b14AN; [15 $+ $chan $+ 14]: 16(15 $+ $banmask16)14 placed by15 $nick14.
  }
  if ($form(other,ban)) iecho $readini %formats other ban
  else iecho 14...tew remove ban press [15f1114]
}
}
on @1:UNBAN:# {
if ((%f11 == on) && (%func == on) && ($nick != $me)) {
  set %f11 off
  .timer 1 7 set %f11 on
  set %kkchan mode $chan +b $banmask
  if ((%ircii != on) && ($chan != $active)) {
    if ($form(other,chanbanrem)) iecho $readini %formats other chanbanrem
    else iecho 15b14AN; [15 $+ $chan $+ 14]: 16(15 $+ $banmask $+ 16)14 removed by15 $nick14.
  }
  if ($form(other,banrem)) iecho $readini %formats other banrem
  else iecho 14...tew redo ban press [15f1114]
}
}
on 1:CLOSE:=: {
if ($nick == %en) {
  if (%email.check) {
    .disable #email
    remove %temp.em
    unset %en %ndm %nem %nxm %ldl %mailcur %email.check %temp.em %temp-em
    .creq %creq
    tsound disconnect
    halt
  }
  elseif (%www.on) {
    .disable #www
    .creq %creq
    .close -c %en
    if (%cver == on) {
      unset %cver %http* %en %www.on
      halt
    }
    if (($exists($browser)) && (%www.run == browser)) run $browser $wwwdir(%httpf)
    else {
      if (%http.topic) viewfile $wwwdir(%httpf) -title %http.topic
      else viewfile $wwwdir(%httpf)
    }
    unset %http* %en %http.topic %www.on
  }
  elseif (%cver) {
    .disable #www
    .close -c %en
    .creq %creq
    unset %cver %http* %en %www.on
  }
}
}
on 1:INVITE:* {
if ($ulevel >= 80) {
  if ($form(other,inviteajoin)) iecho $readini %formats other inviteajoin
  else iecho Autojoining $hc($chan) by the request of $hc($nick) ( $+ $sc($address) $+ ) $ul($ulevel)
  join $chan
}
else {
  if ($form(other,invite)) iecho $readini %formats other invite
  else iecho $hc(INVITE) [ $+ $chan $+ ]: $hc($nick) ( $+ $sc($address) $+ ) $ul($ulevel) at $hc($atime) $+ .
  if ((%f11 == on) && (%func == on)) {
    set %f11 off
    .timer 1 7 set %f11 on
    set %kkchan j $chan
    set %kchan ckb $nick %ckb
    if ($comchan($nick,1).op) {
      if ($form(other,inviteopjoin)) {
        iecho $readini %formats other inviteopjoin
        if ($form(other,inviteopjoin2)) iecho $readini %formats other inviteopjoin2
      }
      else iecho To join $hc($chan) press $hc(F11) $+ , to kickban press $hc(F12) $+ .
    }
    else {
      if ($form(other,invitejoin)) {
        iecho $readini %formats other invitejoin
        if ($form(other,invitejoin2)) iecho $readini %formats other invitejoin2
      }
      else iecho To join $hc($chan) press $hc(F11) $+ .
    }
  }
}
tsound invite
}
#holdtopic off
on @1:TOPIC:%hchan {
if ($nick != $me) {
  .quote topic $chan : $+ %holdtopic
  .quote notice $nick :Please do not change the topic for now. Thanks.
}
}
#holdtopic end
#email off
on 1:DNS {
.disable #email
if (%ris) {
  if ($iaddress == $null) iecho Unable to resolve $hc(%ris) server address. Please try again.
  else {
    iecho $hc(%ris) mail setup successful.
    if (%ris == POP) writeini $sys(ircNdata.ini) %account mailip $iaddress
    elseif (%ris == SMTP) set %smailip $iaddress
  }
  unset %account %ris
}
}
on 1:CHAT:* {
if ($nick != %en) halt
elseif (%ups == on) {
  msg = $+ %en USER $mail.name(%mailcur)
  unset %ups
  set %upw on
}
elseif ((%upw == on) && (pass isin $1-)) {
  msg = $+ %en PASS %passcur
  unset %upw
  set %nmsg1 on
}
elseif ((-ERR == $1) && (timeout isin $2-)) {
  eecho %h Your email session has timed out. Auto re-login.
  close -c %en
  buff ircN Mail
  mail
}
elseif ((-ERR == $1) && (pass isin $2-)) {
  unset %passcur
  iecho The password you supplied for ' $+ $hc($mail.name(%mailcur)) $+ ' was incorrect.
  sF12
}
elseif ((-ERR == $1) && (delete isin $2-)) eecho %h Message $hc(%ndm) has already been deleted.
elseif (-ERR == $1) {
  sF12
  iecho An error has occured, please check your settings and re-login.
}
elseif (%nmsg1 == on) {
  msg = $+ %en STAT
  unset %nmsg1
  set %nmsg on
}
elseif (%nmsg == on) {
  set %nem $2
  if ($2 == 0) {
    iecho No new messages.
    unset %nmsg %nem
    sF12
  }
  else {
    window -ae @ircN Mail %emloc /view $tp(pop.txt) FixedSys 9
    write -c $tp(pop.txt)
    write $tp(pop.txt) exit $chr(123) set $chr(37) $+ emloc $chr(36) $+ swlc(@ircN Mail) $chr(124) sF12 $chr(125)
    write $tp(pop.txt) -
    set %i 0
    :start
    inc %i
    if (%i > %nem) goto next
    write $tp(pop.txt) %i
    write $tp(pop.txt) .view $chr(123) view %i $chr(125)
    write $tp(pop.txt) .dele $chr(123) del %i $chr(125)
    goto start
    :next
    set %nxm 1
    set %kkchan view %nxm
    titlebar @ircN Mail - %nem new messages
    eecho $ac(>) You have $hc(%nem) message(s) ( $+ $hc($3) octets).
    eecho $ac(>) Press $hc(F11) to view first message.
    eecho $ac(>) Alternate: $hc(/view <mail #>)
    unset %nmsg
    .disable #email
    tsound gotmsg
  }
}
elseif (((Content- isin $1-) && (filename isin $1-)) || (X-Attachments isin $1-)) {
  close -c %en
  unset %en
  unset %email.check
  .disable #email
  buff @ircN Mail
  eecho $ac(>) A file attachment was detected. Please skip this message next time.
  buff @ircN Mail
}
elseif ((_NextPart_ isin $1-) || (Content- isin $1-)) halt
elseif ($1- == $null) {
  eecho $chr(160)
  set %minc on
}
elseif ($1 == .) {
  set %kkchan view %nxm
  set %kchan del %ndm
  eecho $ac(>) $hc(END) of message ( $+ $hc(%ndm) $+ ) $+ . To reply to $hc($rpy) press $hc(shift-F11) $+ .
  eecho $ac(>) Press $hc(Shift-F9) to save this message.
  if (%nxm > %nem) {
    set %kchan sF12
    set %kkchan del %ndm
    eecho $ac(>) Last message read. Press $hc(F11) to delete.
    eecho $ac(>) Press $hc(F12) to close connection or type $hc(/bye) $+ .
  }
  else {
    eecho $ac(>) Press $hc(F11) to view next message, $hc(F12) to delete message ( $+ $hc(%ndm) $+ )
  }
  unset %minc
  .disable #email
}
elseif (($1 == Return-Path:) && (@ isin $1-)) {
  write %temp.em $1-
  set %reply $remove($remove($2,<),>)
}
elseif ($1 == From:) {
  write %temp.em $1-
  eecho $ac(>) From: $hc($remove($2-,"))
}
elseif ($1 == To:) {
  write %temp.em $1-
  eecho $ac(>)    To: $hc($2-)
}
elseif ($1 == Subject:) {
  set %subj Re: $remove($2-,Re:)
  eecho $ac(>) Subj: $hc($2-)
  write %temp.em $1-
}
elseif ($1 == Date:) {
  eecho $ac(>) Date: $hc($2-6)
  write %temp.em $1-
  write %temp.em $cr
}
elseif (%minc == on) {
  write %temp.em $1-
  ewrap 75 $imconvert($1-)
}
}
#email end
#sendmail off
on 1:OPEN:=: {
if ($nick == %en) {
  set %mst $ticks
  msg = $+ %en HELO $ip
}
}

on 1:CHAT:* {
if ($nick != %en) halt
elseif ((220 == $1) && (SMTP isin $1-)) msg = $+ %en mail from: %remail
elseif ((250 == $1) && (Sender isin $1-)) {
  if (@ isin %rcpt) {
    msg = $+ %en rcpt to: %rcpt
    set %messageto %rcpt
  }
  else {
    set %sendmail.loops 0
    set %sendmail.end $mail.nicknum(%rcpt)
    :loop
    inc %sendmail.loops
    msg = $+ %en rcpt to: $mail.rnick(%rcpt,%sendmail.loops)
    set %messageto %messageto $+ $chr(44) $+ $mail.rnick(%rcpt,%sendmail.loops)
    if (%sendmail.loops < %sendmail.end) goto loop
    unset %sendmail.loops %sendmail.end
  }
}
elseif ((250 == $1) && (Recipient isin $1-)) msg = $+ %en data
elseif (354 == $1) {
  msg = $+ %en X-Mailer: $strip(%ver) for mIRC
  msg = $+ %en Date: $getdate $gettz
  msg = $+ %en To: %messageto
  msg = $+ %en Subject: %subj
  msg = $+ %en Reply-To: %remail
  msg = $+ %en From: " $+ %myn $+ " < $+ %remail $+ >
  msg = $+ %en Content-Type: text/plain; charset="us-ascii"
  .play = $+ %en $td(email.txt) 0
  if (%signature) {
    msg = $+ %en $chr(160)
    msg = $+ %en $chr(160)
    play = $+ %en %signature 0
  }
  .play -ctemail $me $td(util.txt) 0
  unset %messageto %getdate %time.zone
}
else halt
}
#sendmail end
#www off
on 1:DNS { .quote privmsg $me :DCC CHAT CHAT $longip($iaddress) 80 }
on 1:OPEN:=: {
if ($nick != %en) halt
;elseif (%cver == on) msg =$nick GET %httpd
else write -c $wwwdir(%httpf)
msg =$nick GET %httpd
}
on 1:CHAT:* {
if ($nick != %en) halt
elseif (%cver == on) {
  if ($1 == VER) {
    if ($2- == $strip(%iver)) iecho You are running the latest version of ircN ( $+ $hc($2-) $+ )
    else {
      set %kkchan run $browser http://www.ircN.com
      iecho Your Version: $hc(%ver) Latest Version: $hc($2-)
      iecho $hc($2-) can be found at $hc(http://www.ircN.com)
      if ($exists($browser)) iecho Press $hc(F11) now to connect to the site.
    }
  }
}
else {
  if ($ret(<TITLE>) isin $1-) set %http.topic $remove($remove($1-,<TITLE>),</TITLE>)
  write $wwwdir(%httpf) $1-
}
halt
}
#www end
#notify on
on 1:NOTIFY { .quote userhost $nick | halt }
on 1:UNOTIFY {
if ($form(notify,left)) iecho $readini %formats notify left
else iecho 15(12 $nick 15)15 has left IRC.
halt
}
#notify end
#dictionary off
on 1:OPEN:=: {
if ($nick == %dict.cnick) {
  msg =$nick DEFINE %dict.word
  .timer 1 5 dictclose
}
}
on 1:CHAT:* {
if ($nick == %dict.cnick) {
  if (DEFINITION isin $1) {
    if (%dict.say) {
      write -c $tp(define.txt)  ---------- Definition of  $+ %dict.word $+  ----------
    }
    else {
      window -a @Dictionary %dictloc Terminal 8
      write -c $tp(define.txt) ---------- Definition of %dict.word ----------
      aline @Dictionary . $+ $str(-,82) $+ .
      aline @Dictionary $chr(124) $+ $center(82,Definition of [ $hc(%dict.word) ] ) $+ $chr(124)
      aline @Dictionary $chr(124) $+ $str(-,82) $+ $chr(124)
    }
  }
  elseif (SPELLING isin $1) {
    iecho Could not locate " $+ $hc(%dict.word) $+ " in dictionary, please check your spelling.
    set %dict.spellerr yes
  }
  elseif (($1 isnum) && ($len($1-) < 40)) {
    if (%dict.say) {
      write $tp(define.txt) $fix(2,$under($1)) $bld($2-)
    }
    else {
      if ($window(@Dictionary)) aline @Dictionary $chr(124) $fix(2,$ac($1)) $fix(77,$sc($2-)) $chr(124)
      write $tp(define.txt) $1-
    }
  }
  elseif (($left($1,1) isnum) && ($right($1,1) == .)) {
    if (%dict.say) {
      if ($left($3,1) == \
    }