Channel Control Bot

By Pepsi_Man0077 on Oct 24, 2007

.: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
}

Comments

Sign in to comment.
kslice917   -  Mar 02, 2008

Hehe...I don\'t think I\'ll ever use $istok

But yeah, nice for some simple stuff...and seems to work. Just a little high on the access requirements though, don\'t you think?

Well, just wait until I release my server bot...you\'ll be in trouble then ;)

 Respond  
Pepsi_Man0077   -  Nov 14, 2007

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.

 Respond  
guest598594   -  Nov 13, 2007

yea, basically it checks whether $1 is !+ or !-, and then it does \"mode $chan (now checks whats after !, either + or -) <+/-> $+ (joins two things) $2- ($1 $2 $3 $4 etc...)\"

 Respond  
brinxy   -  Nov 12, 2007

/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.

 Respond  
Pepsi_Man0077   -  Nov 12, 2007

that looks more complicated to me, im new at scripting, what exactly does that do can ya tell me?

 Respond  
guest598594   -  Nov 12, 2007
  elseif $1 = !+ {
    /mode $chan $2 $3- 
  }
  elseif $1 = !- {
    /mode $chan - $+ $2 $3-
  }

u can simplify it to

elseif ($istok(!+ !-,$1,32)) mode $chan $left($1,2) $+ $2-
 Respond  
DJ_Fluid   -  Oct 24, 2007

I helped :) gj as far as I can see.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.