ircN for mIRC — File Browser

ircNformIRCv6.0 / ircNformIRCv6.0 / ircn / SYSTEM / Ctcps.mrc

Ctcps.mrc — 17.19 KB — Download this file

#friends on

ctcp 1:DCC RESUME:halt
ctcp 1:SMURF {
  ctcpreply $nick SMURF (smurf): yeah, eye'm a smurf.  yew wanna make somefin of it?
  echo -a 14[3smurf14(9 $+ $nick $+ 14)]: 9 $+ $nick 3juss ctcp smurf'ed you.
  halt
}
ctcp 1:EREET {
  ctcpreply $nick EREET (smurf): yeah, eye'm ereet.  yew wanna make somefin of it?
  echo -a 14[3smurf14(9 $+ $nick $+ 14)]: 9 $+ $nick 3juss ctcp ereet'ed you.
  halt
}
ctcp 1:HAMSTER {
  ctcpreply $nick SMURF (smurf): yeah, eye'm a hamsteR.  yew wanna make somefin of it?
  echo -a 14[3smurf14(9 $+ $nick $+ 14)]: 9 $+ $nick 3juss ctcp hamster'ed you.
  halt
}
ctcp 40:info {
  if ($2 == $null) .quote notice $nick :Syntax: /CTCP $me INFO <info-line> (sets your info line) or /CTCP $me INFO none (removes your info line)
  elseif ($2 == none) {
    remini $sys(ircndata.ini) display-info-lines $address($nick,3)
    .quote notice $nick :Removed your info line.
  }
  else {
    writeini $sys(ircndata.ini) display-info-lines $address($nick,3) $2-
    .quote notice $nick :Now: $2-
  }
  if (%showctcp == on) {
    if ($2) {
      if ($form(ctcp,otherparam)) iecho $readini %formats ctcp otherparam
      else iecho 16c15tcp!16 $1 15request by :16:15:16 $nick 14(15 $+ $2-14)
    }
    else {
      if ($form(ctcp,other)) iecho $readini %formats ctcp other
      else iecho 16c15tcp!15 $1 15request by 16:15:16: $nick 15at16 $atime $+ 15.
    }
    halt
  }
}
ctcp 40:help {
  .quote notice $nick :List of Commands for User Level VOICE.
  .quote notice $nick :All commands start with /CTCP $me 'COMMAND'
  .quote notice $nick :'CHAN' - Gives you a listing of all channels I am in.
  .timer 1 3 .quote notice $nick :'INVITE <channel #/all>' - Invites you to the requested channel.
  .timer 1 3 .quote notice $nick :'INFO <info-line>' - Sets your info line.
  .timer 1 7 .quote notice $nick :'PASS <password> [newpass]' - Sets or changes your password.
  .timer 1 7 .quote notice $nick :'IDENT <password>' - Adds a new hostmask to my user file.
  .ignore -tu10 $wildsite
  if (%showctcp == on) {
    if ($2) {
      if ($form(ctcp,otherparam)) iecho $readini %formats ctcp otherparam
      else iecho 16c15tcp!16 $1 15request by :16:15:16 $nick 14(15 $+ $2-14)
    }
    else {
      if ($form(ctcp,other)) iecho $readini %formats ctcp other
      else iecho 16c15tcp!15 $1 15request by 16:15:16: $nick 15at16 $atime $+ 15.
    }
    halt
  }
}
ctcp 60:help {
  .quote notice $nick :List of Commands for User Level OP.
  .quote notice $nick :All commands start with /CTCP $me 'COMMAND'
  .quote notice $nick :'CHAN' - Gives you a listing of all channels I am in.
  .timer 1 3 .quote notice $nick :'INVITE <channel #/all>' - Invites you to the requested channel.
  .timer 1 3 .quote notice $nick :'OP <channel> <password>' - Grants you ops in the requested channel.
  .timer 1 7 .quote notice $nick :'VOICE <channel> [nick]' - Gives you or your friends voice in the requested channel.
  .timer 1 7 .quote notice $nick :'UNBAN <channel>' - Removes all bans on you in the requested channel.
  .timer 1 11 .quote notice $nick :'INFO <info-line>' - Sets your info line.
  .timer 1 11 .quote notice $nick :'PASS <password> [newpass]' - Sets or changes your password.
  .timer 1 11 .quote notice $nick :'IDENT <password>' - Adds a new hostmask to my user file.
  .ignore -tu10 $wildsite
  if (%showctcp == on) {
    if ($2) {
      if ($form(ctcp,otherparam)) iecho $readini %formats ctcp otherparam
      else iecho 16c15tcp!16 $1 15request by :16:15:16 $nick 14(15 $+ $2-14)
    }
    else {
      if ($form(ctcp,other)) iecho $readini %formats ctcp other
      else iecho 16c15tcp!15 $1 15request by 16:15:16: $nick 15at16 $atime $+ 15.
    }
    halt
  }
}
ctcp 40:chan {
  if (%showchans == on) {
    unset %chans
    set %i 0
    :start
    inc %i
    if (%i > $chan(0)) .quote notice $nick :I'm on channels: %chans
    elseif ($chan(%i) == %idlechan) goto start
    else {
      if ($me isop $chan(%i)) set %channm @ $+ $chan(%i)
      else set %channm $chan(%i)
      set %chans %chans %channm
      goto start
    }
  }
  else .quote notice $nick :Sorry, that option is disabled.
  if (%showctcp == on) {
    if ($2) {
      if ($form(ctcp,otherparam)) iecho $readini %formats ctcp otherparam
      else iecho 16c15tcp!16 $1 15request by :16:15:16 $nick 14(15 $+ $2-14)
    }
    else {
      if ($form(ctcp,other)) iecho $readini %formats ctcp other
      else iecho 16c15tcp!15 $1 15request by 16:15:16: $nick 15at16 $atime $+ 15.
    }
    halt
  }
}
ctcp 40:invite {
  if ($2 == $null) .quote notice $nick :Syntax: /CTCP $me INVITE <channel # or all>
  elseif ($2 == all) ia $nick
  elseif ($nick ison $2) .quote notice $nick :You are already on  $+ $2 $+ .
  elseif ($me ison $2) {
    if ($me isop $2) {
      .quote invite $nick $2
      .quote notice $2 :Invited $nick ( $+ $address $+ ) to  $+ $2 $+ .
    }
    else .quote notice $nick :I'm not opped in  $+ $2 $+  right now.
  }
  else .quote notice $nick :I'm not on  $+ $2 $+ .
  if (%showctcp == on) {
    if ($2) {
      if ($form(ctcp,otherparam)) iecho $readini %formats ctcp otherparam
      else iecho 16c15tcp!16 $1 15request by :16:15:16 $nick 14(15 $+ $2-14)
    }
    else {
      if ($form(ctcp,other)) iecho $readini %formats ctcp other
      else iecho 16c15tcp!15 $1 15request by 16:15:16: $nick 15at16 $atime $+ 15.
    }
    halt
  }
}
ctcp 60:unban {
  if ($2 == $null) .quote notice $nick :Syntax: UNBAN <channel>
  elseif ($me isop $2) {
    set %unban on
    set %ubadd $address($nick,5)
    set %ubnick $nick
    mode $2 +b
  }
  else .quote notice $nick :I'm not opped in  $+ $2 $+ .
  if (%showctcp == on) {
    if ($2) {
      if ($form(ctcp,otherparam)) iecho $readini %formats ctcp otherparam
      else iecho 16c15tcp!16 $1 15request by :16:15:16 $nick 14(15 $+ $2-14)
    }
    else {
      if ($form(ctcp,other)) iecho $readini %formats ctcp other
      else iecho 16c15tcp!15 $1 15request by 16:15:16: $nick 15at16 $atime $+ 15.
    }
    halt
  }
}
ctcp 60:voice {
  if (%showctcp == on) {
    if ($form(ctcp,other)) iecho $readini %formats ctcp other
    else iecho 16c15tcp!16 $1 15request by :16:15:16 $nick 14(15 $+ $2-14)
  }
  if ($2 == $null) .quote notice $nick :Syntax: /CTCP $me VOICE <channel #> [nickname]
  elseif ($me isop $2) {
    if (($3) && ($atv($nick,$2))) mode $2 +v $3
    elseif (($atv($nick,$comchan($nick,1).op) && ($3 == $null)) mode $2 +v $nick
  }
  else .quote notice $nick :I'm not opped on  $+ $2 $+ .
  if (%showctcp == on) {
    if ($2) {
      if ($form(ctcp,otherparam)) iecho $readini %formats ctcp otherparam
      else iecho 16c15tcp!16 $1 15request by :16:15:16 $nick 14(15 $+ $2-14)
    }
    else {
      if ($form(ctcp,other)) iecho $readini %formats ctcp other
      else iecho 16c15tcp!15 $1 15request by 16:15:16: $nick 15at16 $atime $+ 15.
    }
    halt
  }
}
ctcp 60:op {
  if ($2 == $null) .quote notice $nick :Syntax: /CTCP $me OP <channel #> <password>
  elseif ($me !isop $2) .quote notice $nick :I'm not opped on  $+ $2 $+ .
  elseif ((%reqpass == on) && ($3)) {
    if ($oppw($nick,$3) == 1) {
      %tmp = $readini $sys(ircndata.ini) $usr($nick) opchannel
      if (($2 isin %tmp) || (%tmp == all)) {
        if ($nick !isop $2) mode $2 +o $nick
        else .quote notice $nick :You are already opped on  $+ $2 $+ .
      }
      else .quote notice $nick :You cannot receive ops on  $+ $2 $+ .
    }
    else .quote notice $nick :Invalid password.
  }
  elseif (%reqpass == on) .quote notice $nick :You did not supply your password for  $+ $2 $+ .
  else {
    %tmp = $readini $sys(ircndata.ini) $usr($nick) opchannel
    if (($2 isin %tmp) || (%tmp == all)) mode $2 +o $nick
    else .quote notice $nick :You cannot receive ops on  $+ $2 $+ .
  }
  if (%showctcp == on) {
    if ($2) {
      if ($form(ctcp,otherparam)) iecho $readini %formats ctcp otherparam
      else iecho 16c15tcp!16 $1 15request by :16:15:16 $nick 14(15 $+ $2-14)
    }
    else {
      if ($form(ctcp,other)) iecho $readini %formats ctcp other
      else iecho 16c15tcp!15 $1 15request by 16:15:16: $nick 15at16 $atime $+ 15.
    }
    halt
  }
}
ctcp 1:ident {
  if ($2 == $null) .quote notice $nick :Syntax: /CTCP $me IDENT <password>
  elseif (($idpass($2) != $nick) && ($idpass($2))) .quote notice $nick :You're not $nick, you're $idpass($2) $+ .
  else {
    set %ident on
    set %ipass $2
    .quote whois $nick
  }
  if (%showctcp == on) {
    if ($2) {
      if ($form(ctcp,otherparam)) iecho $readini %formats ctcp otherparam
      else iecho 16c15tcp!16 $1 15request by :16:15:16 $nick 14(15 $+ $2-14)
    }
    else {
      if ($form(ctcp,other)) iecho $readini %formats ctcp other
      else iecho 16c15tcp!15 $1 15request by 16:15:16: $nick 15at16 $atime $+ 15.
    }
    halt
  }
}
ctcp 40:pass {
  if ($usr($nick) != $nick) .quote notice $nick :You're not $nick $+ , you're $usr($nick) $+ .
  elseif ($3) {
    if ($len($3) < 4) .quote notice $nick :Please use at least 4 characters.
    elseif ($idpass($3)) .quote notice $nick :Invalid password, please try again.
    elseif ($idpass($2) == $rb($nick)) {
      writeini $sys(ircndata.ini) $rb($nick) password $3
      writeini $sys(ircndata.ini) passwords $3 $rb($nick)
      remini $sys(ircndata.ini) passwords $2
      .quote notice $nick :Changed password to ' $+ $3 $+ '
    }
    else .quote notice $nick :Password you supplied did not match.
  }
  elseif ($2) {
    if ($readini -n $sys(ircndata.ini) $rb($nick) password) .quote notice $nick :You already have a password set.
    elseif ($len($2) < 4) .quote notice $nick :Please use at least 4 characters.
    elseif ($idpass($2)) .quote notice $nick :Invalid password, please try again.
    else {
      writeini $sys(ircndata.ini) $rb($nick) password $2
      writeini $sys(ircndata.ini) passwords $2 $rb($nick)
      .quote notice $nick :Password set to ' $+ $2 $+ '
    }
  }
  else .quote notice $nick :Syntax: /CTCP $me PASS <password>
  if (%showctcp == on) {
    if ($2) {
      if ($form(ctcp,otherparam)) iecho $readini %formats ctcp otherparam
      else iecho 16c15tcp!16 $1 15request by :16:15:16 $nick 14(15 $+ $2-14)
    }
    else {
      if ($form(ctcp,other)) iecho $readini %formats ctcp other
      else iecho 16c15tcp!15 $1 15request by 16:15:16: $nick 15at16 $atime $+ 15.
    }
    halt
  }
}
#friends end
ctcp 30:dcc chat {
  if ($5 == 19) .creq ignore
  else .creq %creq
  tsound dccchat
  if ((%showctcp == on) && ($nick != $me)) {
    if ($form(dcc,chat)) iecho $readini %formats dcc chat
    else iecho 16c15tcp!15 $1 15request by 16:15:16: $nick 15at16 $atime $+ 15.
  }
}
ctcp 30:dcc send {
  if ((%dccrelay == on) && (%dccnick)) {
    %dccrinfo = .quote privmsg [ $nick ] : $+ $1- $+ 
    .quote privmsg %dccnick : $+ $1- $+ 
    .sreq ignore
    if ($nick != $me) {
      if ($form(dcc,sendfwd)) iecho $readini %formats dcc sendfwd
      else iecho Fowarding $hc(SEND) from $hc($nick) ( $+ $sc($address) $+ ) to $hc(%dccnick) $+ . [ $+ $hc($3) $+ : $+ $sc($alof($6)) $+ ]
    }
    halt
  }
  if ((%showctcp == on) && ($nick != $me)) {
    if ($form(dcc,send)) iecho $readini %formats dcc send
    else iecho 16c15tcp16!15SEND 14request by15 $nick $+ 16!15 $+ $address 14[15 $+ $314:15 $+ $alof($6) $+ 14]
  }
  .sreq %sreq
  if (($window(@DCC) == $null) && (%dccstatus == on)) dccstatus on
  tsound dccsend
}
ctcp 1:sound {
  if (%playsnds == on) {
    if ($exists($wavdir($2-))) splay $2-
    elseif ($exists($middir($2-))) splay $2-
  }
  if (%showctcp == on) {
    if ($chan) {
      if ($form(ctcp,chansound)) iecho $readini %formats ctcp chansound
      else iecho 15[10 $+ $nick15] 14has done a 15SOUND14 of $2- on15 $chan.
    }
    else {
      if ($form(ctcp,sound)) iecho $readini %formats ctcp sound
      else iecho ctcp $sc(SOUND) request by $hc($nick) $+ : $2-
    }
    halt
  }
}
ctcp 1:dcc chat {
  if ($5 == 19) .creq ignore
  else .creq %creq
  tsound dccchat
  if ((%showctcp == on) && ($nick != $me)) {
    if ($form(dcc,chat)) iecho $readini %formats dcc chat
    else iecho $hc(CHAT) request by  $+ $hc($nick) $+ ( $+ $sc($address) $+ ) port[ $+ $sc($5) $+ ]
  }
}
ctcp 1:dcc send {
  if ($findtok(%badfiles,$right($3,3),32)) {
    if ($nick != $me) {
      if ($form(dcc,sendignore)) iecho $readini %formats dcc sendignore
      else iecho 16c15tcp16!15SEND 14request by15 $nick $+ 16!15 $+ $address 14[15 $+ $314:15 $+ $alof($6) $+ 14]
    }
    halt
  }
  if ((%dccrelay == on) && (%dccnick)) {
    %dccrinfo = .quote privmsg [ $nick ] : $+ $1- $+ 
    .quote privmsg %dccnick : $+ $1- $+ 
    .creq ignore
    if ((%showctcp == on) && ($nick != $me)) {
      if ($form(dcc,sendfwd)) iecho $readini %formats dcc sendfwd
      else iecho Fowarding $hc(SEND) from $hc($nick) ( $+ $sc($address) $+ ) to $hc(%dccnick) $+ . [ $+ $hc($3) $+ : $+ $sc($alof($6)) $+ ]
    }
    halt
  }
  if ((%showctcp == on) && ($nick != $me)) {
    if ($form(dcc,send)) iecho $readini %formats dcc send
    else iecho 16c15tcp16!15SEND 14request by15 $nick $+ 16!15 $+ $address 14[15 $+ $314 $+ : $+ 15 $+ $alof($6) $+ 14]
  }
  .sreq %sreq
  if (($window(@DCC) == $null) && (%dccstatus == on)) dccstatus on
  tsound dccsend
}
#pager off
ctcp 1:page {
  if ($chan == $null) {
    write $td(page.txt) aline @Pages Nick: $nick
    write $td(page.txt) aline @Pages From: $address on ( $+ $replace($adate,/,-) at $atime $+ )
    if ($2) write $td(page.txt) aline @Pages Page: $2-
    else write $td(page.txt) aline @Pages Page: no message
    write $td(page.txt) aline @Pages $str(70,-)
    if ($away) .quote notice $nick :Your page has been received (Away Time: $gone $+ )
    else .quote notice $nick :Your page has been recieved.
    tb
    if ((%theme.page == on) && (%themes == on)) tsound page
    elseif ($exists(%sound)) .splay %sound
  }
  if (%showctcp == on) {
    if ($2) {
      if ($form(ctcp,otherparam)) iecho $readini %formats ctcp otherparam
      else iecho 14(16c15tcp14:15 $+ $114) reQuest ..(15by16!15 $+ $nick14).. --15 $2-
    }
    else {
      if ($form(ctcp,other)) iecho $readini %formats ctcp other
      else iecho 14..(16c15tcp!16 $+ $114).. request [15by16:15 $+ $nick 16@15 $atime14]
    }
    halt
  }
}
#pager end
ctcp 1:url {
  .ctcpreply $nick URL %url
  if (%showctcp == on) {
    if ($2) {
      if ($form(ctcp,otherparam)) iecho $readini %formats ctcp otherparam
      else iecho 14(16c15tcp14:15 $+ $114) reQuest ..(15by16!15 $+ $nick14).. --15 $2-
    }
    else {
      if ($form(ctcp,other)) iecho $readini %formats ctcp other
      else iecho 14..(16c15tcp!16 $+ $114).. request [15by16:15 $+ $nick 16@15 $atime14]
    }
    halt
  }
}
ctcp 1:ping {
  .ctcpreply $nick PING $2
  if ((%showctcp == on) && ($1 != DCC) && ($nick != $me)) {
    if ($chan) {
      if ($form(ctcp,chanother)) iecho $readini %formats ctcp chanother
      else iecho 15[10 $+ $nick15]14 has requested a15 $114 on15 $chan14.
    }
    else {
      if (($2 == $null) || ($2 isnum)) set %cpms $chr(32) $+ at $hc($atime)
      else set %cpms : $2-
      if ($form(ctcp,otherparam)) iecho $readini %formats ctcp other2
      else iecho 14..(15c16tcp15!16 $+ $1 $+ 14).. request by15 $nick14..
      unset %cpms
    }
    halt
  }
  elseif ((%showctcp == on) && ($nick == $me)) halt
}
ctcp 1:* {
  if ($nick != $me) {
    set %lastnick $nick
    set %ctcprec [ $+ $nick $+ ! $+ $address $+ ] $1-
  }
  if ($left($1,3) == VER) {
    if (%ver-reply) .ctcpreply $nick VERSION %vershun
    else {
      if (%mvereply == on) .ctcpreply $nick VERSION mIRC $+ $bitver v $+ $version K.Mardam-Bey
      if (%vereply == on) .ctcpreply $nick VERSION %ver for mIRC - $read $td(quotes.txt) -
    }
  }
  if (($1 == $mchk(irn)) && ($a2($nick))) { setir $nick | halt }
  if ((%showctcp == on) && ($1 != DCC) && ($nick != $me)) {
    if ($chan) {
      if ($form(ctcp,chanother)) iecho $readini %formats ctcp chanother
      else iecho 15[10 $+ $nick15]14 has requested a15 $114 on15 $chan14.
    }
    else {
      if (($2 == $null) || ($2 isnum)) set %cpms $chr(32) $+ at $hc($atime) $+ .
      else set %cpms : $2-
      if ($form(ctcp,otherparam)) iecho $readini %formats ctcp other2
      else iecho 16c15tcp!16 $+ $1 15request by :16:15:16 $nick $+ %cpms
      unset %cpms
    }
    halt
  }
  elseif ((%showctcp == on) && ($nick == $me)) halt
}