.:Channel-Control-Bot:.
.:Copy into Remotes of bot:.
.:Type "!+ m" without quotes with your bot:.
.:Type "!500 " without quotes with your bot:.
This BOT will control your channel. Make sure the bot has channel powers (+o) and type any of the commands below to give access/set channel modes.
Now if people flood over 10 lines without someone else saying something, they will lose +ovh and not be able to talk for 5 minutes. Then after 5 minutes the Bot will auto +v them and unset the ban. Every nick that joins the channel will get +v.
.:Commands and uses:.
!ahop "nick" - Auto Halfops "nick" and sets them +h
!aop "nick" - Auto OP "nick" and sets them +o
!admin "nick" - Give "nick" admin powers and sets them +oa
!remove "nick" - Removes "nick" Privileges and sets them -vhoa
!+ "mode" [optional nick] - if no nick is used: sets channel mode. If nick is used: Sets nick mode
!- "mode" [optional nick] - if no nick is used: removes channel mode. If nick is used: Removes nick mode
!500 "nick" - Sets "nick" as a 500 user and gives him/her access control all below commands (note: be careful who you give this to)
!say - Says Text in channel
!part - Leaves channel
!google - Googles Text
!imggoogle - Google Image's text
ON 500:TEXT:*:#: {
if $1 = !ahop {
/cs access $chan add $2 4
.timer 1 1 /notice $2 $nick made you a $chan Halfop on $adate
/notice $nick it worked!
/mode $chan h $2
}
elseif $1 = !aop {
/cs access $chan add $2 5
.timer 1 1 /notice $2 $nick made you a $chan OP on $adate
/notice $nick it worked
/mode $chan o $2
}
elseif $1 = !admin {
/cs access $chan add $2 10
.timer 1 1 /notice $2 $nick made you a $chan Admin on $adate
/notice $nick it worked
/mode $chan oa $2 $2
}
elseif $1 = !remove {
/cs access $chan del $2 1
/mode $chan -vhoa $2 $2 $2 $2
.timer 1 1 /notice $2 any Privileges you had in $chan were removed by $nick on $adate
/notice $nick it worked
}
elseif ($istok(!+ !-,$1,32)) mode $chan $left($1,2) $+ $2-
/mode $chan $2 $3-
}
elseif $1 = !500 {
haltdef
auser $2 500
/notice $2 you were made a user of $me
/notice $2 PM me with "!commands"
}
}
ON *:JOIN:*: {
if $me isop $chan {
/mode $chan v $nick
/notice $nick Welcome $nick $+ !
/notice $nick Like me as a bot? Use my scripts for your bot.
/notice $nick http://www.hawkee.com/snippet/3431/
}
elseif ($nick isop $chan) || ($nick ishop $chan) { halt }
}
ON *:INPUT:*: {
if $1 = !ahop {
haltdef
/cs access $chan add $2 4
.timer 1 1 /notice $2 I made you a $chan Halfop on $adate
/mode $chan h $2
}
elseif $1 = !aop {
haltdef
/cs access $chan add $2 5
.timer 1 1 /notice $2 I made you a $chan OP on $adate
/mode $chan o $2
}
elseif $1 = !admin {
haltdef
/cs access $chan add $2 10
.timer 1 1 /notice $2 I made you a $chan Admin on $adate
/mode $chan oa $2 $2
}
elseif $1 = !remove {
haltdef
/cs access $chan del $2 1
/mode $chan -vhoa $2 $2 $2 $2
.timer 1 1 /notice $2 any Privileges you had in $chan were removed by me on $adate
}
elseif ($istok(!+ !-,$1,32)) mode $chan $left($1,2) $+ $2-
haltdef
/mode $chan $2 $3-
}
elseif $1 = !500 {
haltdef
auser $2 500
/notice $2 you were made a user of $me
/notice $2 PM me with "!commands"
}
}
ON 500:TEXT:*:?: {
if $1 = !say {
/msg $2 $3-
}
elseif $1 = !part {
/part $2 Remotley left $chan by $nick
}
elseif ($1 == !commands) {
/msg $nick .:Commands and uses:.
/msg $nick !ahop "nick" - Auto Halfops "nick" and sets them +h
/msg $nick !aop "nick" - Auto OP "nick" and sets them +o
/msg $nick !admin "nick" - Give "nick" admin powers and sets them +oa
/msg $nick !remove "nick" - Removes "nick" Privileges and sets them -vhoa
/msg $nick !+ "mode" [optional nick] - if no nick is used: sets channel mode. If nick is used: Sets nick mode
/msg $nick !- "mode" [optional nick] - if no nick is used: removes channel mode. If nick is used: Removes nick mode
/msg $nick !500 "nick" - Sets "nick" as a 500 user and gives him/her access control all below commands
/msg $nick !say <channel> <text> - Says text in channel
/msg $nick !part <channel> - Leaves Channel
}
}
ON *:TEXT:*:#: {
if $1 == !google && ($2) { msg $chan http://www.google.com/search?q= $+ $htmlfrm($2-) }
elseif $1 == !imggoogle && ($2) { msg $chan http://images.google.com/images?gbv=2&svnum=10&hl=en&q= $+ $htmlfrm($2-) }
}
alias htmlfrm {
var %i = 1,%r
while (%i <= $len($1-)) {
if ($mid($1-,%i,1) isalnum) { %r = %r $+ $ifmatch }
else { %r = %r $+ % $+ $base($asc($mid($1-,%i,1)),10,16,2) }
inc %i
}
return %r
}
Awesome i get it, thanks guys. Thats pretty simple, i dont get how it works but its cool. Do you guys see anything wrong with this script? Particularly in the 500:TEXT::#: and the 500:TEXT::?: sections cause those parts stopped working on my bot recently. I know for sure im added to the users list too.
/help $istok works just the same... but:
$istok(!+ !-,$1,32) checks if either !+ of !- isin the first bit of syntax. The rest of the code, mode $chan $left($1,2) $+ $2- simply takes !- o|h|v etc and applies it to the mode itself. Very confusing for me to explain, miserable at explaining, but here is an example:
<brinxy`> !- o sets mode - o on whoever I specify. - Being the second to the left [$left($1,2)] & o being the $2-.
Hope that helps.