Basically a large script with many functions, for the functions type: !help once loaded.
This Bot:
Not Fully Tested, Feedback needed.
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
To Add Users to the Blacklist type: /add <-Nick-> |
To Remove Users from the Blacklist type: /del <-Nick-> +
To Play/Pause a song with the itunes controls type: /itunes play |
To Skip to the next track type: /itunes next +
To Goto the previous track type: /itunes previous |
To Stop a song type: /itunes stop +
To Set yourself away type: /gone <-Reason-> |
To Set yourself as back type: /here +
To Usewhois function type: /Whois <-Nick-> |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Feel free to customise it.
raw 311:*:{ .haltdef
/echo -a 4[---+-12 $time $+ : $+ Beginning Of Whois List 4-+---]
/echo -a 4[---+-12 $time $+ : $1- 4-+---]
}
raw 319:*:{ .haltdef
/echo -a 4[---+-12 $time $+ : $1- 4-+---]
}
raw 312:*:{ .haltdef
/echo -a 4[---+-12 $time $+ : Server: $1- -+---]
}
raw 307:*:{ .haltdef
/echo -a 4[---+-12 $time $+ : $1- 4-+---]
}
raw 317:*:{ .haltdef
/echo -a 4[---+-12 $time $+ : signed on: $asctime($4) idle: $duration($3) -+---]
}
raw 318:*:{ .haltdef
/echo -a 4[---+-12 $time $+ : $+ End Of Whois List 4-+---]
}
alias check {
if ($2) && ($2 ison $1) && ($3 isop $1) && ($3 ison $1) && ($4 == .k) {
%x = $1 $2 Ordered by $3
}
elseif ($2) && ($2 ison $1) && ($3 isop $1) && ($3 ison $1) && ($5 == .kb) {
%x = $1 $2 $4 Ordered by $3
}
elseif ($3) && ($3 ison $2) && ($4 isop $2) && (+* iswm $1) {
%x = $2 $1 $3 Ordered by $4
}
elseif ($3) && ($3 ison $2) && ($4 isop $2) && (-* iswm $1) {
%x = $2 $1 $3 Ordered by $4
}
return %x
}
on *:INPUT:#:{
if ($1 == .k) {
.raw -q KICK $check($chan,$2,$nick,$1)
}
elseif ($1 == .kb) {
.Ban -k $check($chan,$2,$nick,$3,$1)
}
elseif (+* iswm $1) {
.raw -q MODE $check($1,$chan,$2,$nick)
}
elseif (-* iswm $1) {
.raw -q MODE $check($1,$chan,$2,$nick)
}
elseif ($1 == !help) {
/msg $me 12To Add Users to the Blacklist type: 4/add <-Nick->
/msg $me 12To Remove Users from the Blacklist type: 4/del <-Nick->
/msg $me 12To Play/Pause a song with the itunes controls type: 4/itunes play
/msg $me 12To Skip to the next track type: 4/itunes next
/msg $me 12To Goto the previous track type: 4/itunes previous
/msg $me 12To Stop a song type: 4/itunes stop
/msg $me 12To Set yourself away type: 4/gone <-Reason->
/msg $me 12To Set yourself as back type: 4/here
/msg $me 12To Usewhois function type: 4/Whois <-Nick->
}
}
on @*:JOIN:#:{ inc -u5 %mass 1
raw -q MODE # +v $nick
if (Guest* iswm $nick) {
Ban -ku60 $nick 2 (Blacklisted)60 second ban pls ident)
.add $nick
}
elseif (!%nick) {
set -u5 %nick $nick
}
elseif (%nick) && (!%nick1) {
set -u5 %nick1 $nick
}
elseif (%nick1) && (!%nick2) {
set -u5 %nick2 $nick
}
elseif ($address($nick,2) == %banmask) {
raw -q MODE +b $address($nick,2)
raw -q KICK # $address($nick,2)
}
elseif (%mass >= 3) {
raw -q KICK # %nick Mass Join
raw -q KICK # %nick1 Mass Join
raw -q KICK # %nick2 Mass Join
}
else {
set -u3 %banmask $address($nick,2)
}
}
on @*:BAN:#:{
if ($banmask iswm $address($me,5)) {
raw -q MODE # -bQ+b $banmask $address($nick,2)
raw -q KICK # $nick No Banning Me!
.add $nick
}
}
on @*:KICK:#:{
if ($knick == $me) {
raw -q JOIN #
raw -q MODE # +b-Q $address($nick,2)
raw -q KICK # $nick No Kicking Me!
.add $nick
}
}
alias add { if (!$1) {
.auser -a loser $nick
if ($nick ison #) {
raw -q kick # $nick Blacklist
.mode # +b $address($nick,3)
}
}
else {
.auser -a loser $1
if ($1 ison #) {
raw -q kick # $1 Blacklist
.mode # +b $address($1,3)
}
}
}
alias del {
.ruser $1
}
alias itunes {
if ($1 == open) {
.comopen itunes itunes.application
.echo -a $comerr
}
if ($1 == Play) {
.set %play $com(itunes,PlayPause,3)
/track
if (!%play) {
.echo -a No track to play, Itunes may not be open.
}
}
if ($1 == Next) {
.set %next $com(itunes,NextTrack,3)
/track
if (!%next) {
.echo -a No track to play, Itunes may not be open.
}
}
if ($1 == Previous) {
.set %Previous $com(itunes,PreviousTrack,3)
/track
if (!%Previous) {
.echo -a No track to play, Itunes may not be open.
}
}
if ($1 == Stop) {
.set %stop $com(itunes,Stop,3)
if (!%stop) {
.echo -a No track to play, Itunes may not be open.
}
}
}
alias track {
if (!$com(itunes)) { .comopen itunes iTunes.Application
}
if ($com(CurrentTrack)) { .comclose CurrentTrack
}
.echo -q $com(itunes,CurrentTrack,3,dispatch* CurrentTrack)
.echo -q $com(CurrentTrack,Artist,3)
.set %artist $com(CurrentTrack).result
.echo -q $com(CurrentTrack,Album,3)
.set %album $com(CurrentTrack).result
.echo -q $com(CurrentTrack,Time,3)
.set %time $com(CurrentTrack).result
.echo -q $com(CurrentTrack,Rating,3)
.set %rating $com(CurrentTrack).result
if (%rating == 100) {
.set %rating @@@@@
}
.echo -q $com(CurrentTrack,Name,3)
.set %name $com(CurrentTrack).result
/msg # 4Artist: 12 %artist 4Track: 12 %name 4Album: 12 %album 4Time: 12 %time 4Rating: 12 %rating $+ .
}
alias start {
/timers off
/timer 0 1 power
}
alias power {
if (!$com(itunes)) { .comopen itunes iTunes.Application
}
if ($com(CurrentTrack)) { .comclose CurrentTrack
}
.echo -q $com(itunes,CurrentTrack,3,dispatch* CurrentTrack)
.echo -q $com(CurrentTrack,Name,3)
.set %name2 $com(CurrentTrack).result
if (%name !== %name2) {
/track
}
}
alias gone {
set %away 1
set %time $ctime
set %reason $1-
set %nick $me
/nick $me $+ `afk
/ame 9Has gone afk Reason: %reason
/away $1-
}
alias here {
set %away 2
/ame 9Is Back left: $duration($calc($ctime - %time )) Reason: %reason
/away
/nick %nick
}
on loser:JOIN:#:{
Ban -ku60 # $nick 2 (Blacklisted)60 second ban)
}
on *:NICK:{ if (Guest* iswm $newnick) {
.add $newnick
}
}