All pastes #71446 Raw Edit

Untitled

public text v1 · immutable
#71446 ·published 2006-06-25 19:43 UTC
rendered paste body
on *:JOIN:#: { if ($chan == %public.channel ) { 
    //notice $nick 7,14Welcome to %public.channel . I'm the channels bot. type in !help to get a list of commands. Alternatively, you can pm me the word "help"!
  } 
}

on *:TEXT:!ip:#: { //notice $nick 7,14::: %ip 7::: }

on *:TEXT:!members:#: { //notice $nick 7,14:::1 BD  Members 7::: }

on *:TEXT:!rank:#: { //notice $nick 7,14 %clan.name are ranked:  %rank  }

on *:TEXT:!setrank *:#: { if ($nick isop $chan) { //unset %ukcslrank | //set %rank $2- | //notice $nick 7,14 Current Rank Changed To: %rank }
}

on *:TEXT:!lastresult:#: { //notice $nick 7,14 %clan.name Last Result:  %lastresult }

on *:TEXT:!result *:#: { if ($nick isop $chan) { //unset %lastresult | //set %lastresult $2- | //notice $nick 7,14 Last Result Changed To: $2- } else { //notice $nick 1,4 SORRY YOU DO NOT HAVE ACCESS TO THIS COMMAND! }
}

on *:TEXT:!setnextmatch * * * *:#: { if ($nick isop $chan) { //unset %nextmatchdate | //unset %nextmatchenemy | //unset %nextmatchleague | //unset %nextmatchtime | //set %nextmatchdate $2 | //set %nextmatchtime $3 | //set %nextmatchenemy $4 | //set %nextmatchleague $5 | //set %nextmatchwa $nick | //notice $nick 7,14 Next Match Info Set To: [Date: %nextmatchdate ] - [Time: %nextmatchtime ] - [Opponent: %nextmatchenemy ] - [Match Type: %nextmatchleague ] - [Organiser: %nextmatchwa ] } 
}

on *:TEXT:!nextmatch:#: { if ($nick isop $chan) { //notice $nick 7,14Our Next Match Is: [Date: %nextmatchdate ] - [Time: %nextmatchtime ] - [Opponent: %nextmatchenemy ] - [Match Type: %nextmatchleague ] - [Organiser: %nextmatchwa ] }
  ELSE { //notice $nick 1,4 SORRY YOU DO NOT HAVE ACCESS TO THIS COMMAND! }
}

on *:TEXT:!site:#: { //notice $nick 7,14::: http://s10.invisionfree.com/Blackdragons  7::: }

on *:TEXT:!topic *:#: { if ($nick isop $chan) { //topic $chan 7,14 $2- }
  else { //notice $nick 1,4 SORRY YOU DO NOT HAVE ACCESS TO THIS COMMAND! }
}

on *:TEXT:!op *:#: { if ($nick isop $chan) { //mode $chan +o $2 } 
  ELSE { //notice $nick 1,4 SORRY YOU DO NOT HAVE ACCESS TO THIS COMMAND! 
  }      
}

on *:TEXT:!deop *:#: { if ($nick isop $chan) { //mode $chan -o $2 } 
  ELSE { //notice $nick 1,4 SORRY YOU DO NOT HAVE ACCESS TO THIS COMMAND! 
  }      
}

on *:TEXT:!voice *:#: { if ($nick isop $chan) { //mode $chan +v $2 } 
  ELSE { //notice $nick 1,4 SORRY YOU DO NOT HAVE ACCESS TO THIS COMMAND! 
  }      
}
on *:TEXT:!devoice *:#: { if ($nick isop $chan) { //mode $chan -v $2 } 
  ELSE { //notice $nick 1,4 SORRY YOU DO NOT HAVE ACCESS TO THIS COMMAND! 
  }      
}

on *:TEXT:!kick *:#: { if ($2 isop $chan) { //notice $nick Sorry You Can not Kick An OP | halt }
  elseif ($nick isop $chan) { //kick $chan $2 7,14 $me > ALL }
  elseif ($nick !isop $chan) { //notice $nick 1,4 SORRY YOU DO NOT HAVE ACCESS TO THIS COMMAND! }
}

on *:TEXT:!ban *:#: { if ($2 isop $chan) { //notice $nick Sorry You Cannot Ban An OP | halt }
  elseif ($nick isop $chan) { //mode $chan +b $2 
  //kick $chan $2 7,14 $me > ALL }
  elseif ($nick !isop $chan) { //notice $nick 1,4 SORRY YOU DO NOT HAVE ACCESS TO THIS COMMAND! }
}

on *:TEXT:!unban *:#: { if ($nick isop $chan) { //mode $chan -b $2 
  //msg $2 7,14 You Have Been Unbanned From $chan By $nick }
  elseif ($nick !isop $chan) { //notice $nick 1,4 SORRY YOU DO NOT HAVE ACCESS TO THIS COMMAND! }
}

on *:TEXT:!info:#: { //notice $nick 1,14 I am $me A Clan Bot Created by Hawkeye84 ( http://s14.invisionfree.com/glorywarriors  ). For Commands please go here http://z14.invisionfree.com/glorywarriors/index.php?showtopic=448 . Have fun and injoy your stay . Since 4th September 2004, I have been online for: $online . I am owned by %owner }


on *:TEXT:!mod:#: { if ($nick isop $chan) { //mode $chan +m }
  ELSE { //notice $nick Sorry you do not have access to this command }
}

on *:TEXT:!unmod:#: { if ($nick isop $chan) { //mode $chan -m }
  ELSE { //notice $nick Sorry you do not have access to this command }
}

on *:TEXT:!war *:#: { if ($nick isop $chan) { //amsg %public.channel are looking for: $2- . msg $nick for details. }
  ELSE { //notice $nick Sorry, you do not have access to this command 
  }
}

on *:TEXT:!challenge * *:#: { 
  //msg %private.channel 10,1  $nick from $2 is looking for a pcw @ $3 . Get in touch!!
  //msg %private.channel 13,12  $nick from $2 is looking for a pcw @ $3 . Get in touch!!
  //msg %private.channel $nick from $2 is looking for a pcw @ $3 . Get in touch
}

on *:TEXT:help:?: {
  //msg $nick 7,14 -[1 !usercommands <7>1 !opcommands 7]-
}

on *:TEXT:!help:#: {
  //msg $nick 7,14 -[1 !usercommands <7>1 !opcommands 7]-
}

on *:TEXT:!usercommands:*: {
  //msg $nick 7,14 7-[1 !ip  <7>1 !members <7>1 !site <7>1 !seen <nick> <7>1 !google TERM <7>1 !lastresult <7>1 !rank <7>1 !challenge YOURCHANNEL TIME <7>1 !info 7]-
  //msg $nick 7,14 7-[1 All Commands To Be Typed In Channel Window 7]-

}

on *:TEXT:!opcommands:*: {
  //msg $nick 7,14 7-[1 !voice <nick>  <7>1 !devoice <nick> <7>1 !op  <nick> <7>1 !deop <nick> <7>1 !topic <topic> <7>1 !ban <nick> <7>1 !unban <nick> <7>1 !kick <nick> <7>1 !mod <7>1 !unmod <7>1 !war ?v? // map // skill <7>1 !result dAc (xx) -vs- TEAM (xx) <7>1 !setrank <RANK IN LEAGUES> <7>1 !nextmatch <7>1 !setnextmatch x/x/04 20:00 ClanName MATCHTYPE 7]-
  //msg $nick 7,14 7-[1 All Commands To Be Typed In Channel Window 7]-

}

on 1:text:*seen*:#: {
  if ($1 == !seen) {
    if ($2 == $null) { .notice $nick Usage !seen <nick> | halt }
    if ($2 == $me) { .notice $nick Yes I'm here... $+ . | halt }
    if ($2 == $nick) { .notice $nick What a surprise $nick, YOU ARE HERE! | halt }
    if ($2 ison $chan) { .notice $nick $2 is in this chan already. | halt }
    if ($readini ini\users.ini $2 date == $null) { .notice $nick $2 has not been seen by me. | halt }
    else { 
      if ($readini ini\users.ini $2 me == $null) { 
        if ($readini ini\users.ini $2 part == yes) { .msg $nick $2 was last seen parting [ $readini ini\users.ini $2 chan ]  $+ $duration($calc($ctime($fulldate)-$ctime($readini ini\users.ini $2 date))) ago. }
        else { .msg $nick [ $2 ] was last seen quiting  $+ $duration($calc($ctime($fulldate)-$ctime($readini ini\users.ini $2 date))) ago with the message: " $+ [ $readini ini\users.ini $2 message ] $+ ". }
      }
      else { 
        if ($readini ini\users.ini $2 part == yes) { .msg $nick $2 was last seen parting [ $readini ini\users.ini $2 chan ]  $+ $duration($calc($ctime($fulldate)-$ctime($readini ini\users.ini $2 date))) ago. | .msg $nick 5 $+ $2 $+ 's last action was: [ $readini ini\users.ini $2 me ] } 
        else { .msg $nick $2 was last seen quiting  $+ $duration($calc($ctime($fulldate)-$ctime($readini ini\users.ini $2 date))) ago with the message: " $+ [ $readini ini\users.ini $2 message ] $+ ". | .msg $nick $2 $+ 's last action was: [ $readini ini\users.ini $2 me ] }
      }
    }
    else { halt }
  }
}
#sen end
#sjsen on
on 1:QUIT:/writeini -n ini\users.ini $nick date $fulldate | writeini -n ini\users.ini $nick part no | writeini -n ini\users.ini $nick message $1-
on 1:PART:#:/writeini -n ini\users.ini $nick date $fulldate | writeini -n ini\users.ini $nick chan $chan | writeini -n ini\users.ini $nick part yes
on 1:ACTION:*:#:writeini -n ini\users.ini $nick me * $+ $nick $1-
#sjsen end

; google script

alias google {
  ;if you use a proxy server, you can put its ip/port in here, and that should work fine.
  ;note: I've used google's ip to save the time of a dns lookup. You're welcome to change it to google.com
  sockopen google google.com 80
  %google.temp = $1-
}
on 1:sockopen:google:{
  if ($sockerr > 0) return
  sockwrite -n google $eval(GET http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=,0) $+ %google.temp $+ $eval(&btnI=I%27m+Feeling+Lucky HTTP/1.0,0)
  sockwrite -n google
}

on 1:sockread:google:{
  ;ths event has been added to in order to allow remote !google commands
  if ($sockerr > 0) return
  :nextread
  sockread %google.temp
  if ($sockbr == 0) return
  if ( Location: isin %google.temp ) {
    if ( %google.nick != $null ) {
      notice %google.nick 2G4o8o2g3l4e $right(%google.temp,-10)
      unset %google.nick
    }
    else {
      echo 2G4o8o2g3l4e $right(%google.temp,-10)
    }
    sockclose google | return
  }
  elseif ( did not match any documents isin %google.temp ) {
    if ( %google.nick != $null ) {
      notice %google.nick 2G4o8o2g3l4e No match
      unset %google.nick
    }
    else {
      echo 2G4o8o2g3l4e No match
    }
  }
  goto nextread
}

;A simple remote implementation of the google script

on 1:text:!google*:#:{
  %google.nick = $nick
  google $2-
}

me,12).state == 1) { g.ini all on } | else { g.ini all off }
if ($did($dname,16).state == 1) { g.ini active on } | else { g.ini active off }
}