Service bot

By Vesperia on Sep 28, 2009

This is something I made while I was bored. I got lazy and didn't like typing out the entire /msg chanserv and /msg nickserv. This is mainly for servers with chanserv and nickserv. Be sure to set a varaible for %server (your server) %mainchan (Bot's channel) %bot.pass (Bot's nick password) %mainchanpass (Bot's channel password).

Update: Thanks to Ghost-Writer I updated it so you don't have to set the varaibles using the: /set command

*:load: { set variable $$?"whats the bots pass" | set %variable $$?"whats my name" | set %variable $$?:whats my channel" | set %variable $$?"whats my channel password" | set %variable $$?"whats my server" |
}
on *:CONNECT: {
  timer 1 5 /ns identify %bot.pass
  timer 1 8 /cs identify %mainchan %mainchanpass
  timer 1 10 /join %mainchan
  timer 1 12 /ns update
}
on owner:TEXT:!restart*:#: {   
  timer 1 1 msg $chan Restarting $me $+ , $nick $+ .
  timer -o 1 3 /server %server
}
on *:JOIN:%mainchan: {
  notice $nick Welcome to $chan $+ , $nick $+ .
}
on owner:TEXT: *:#:{
  if ($1 == !voice) /mode $chan +v $2
  if ($1 == !devoice) /mode $chan -v $2
  if ($1 == !halfop) /mode $chan +h $2
  if ($1 == !dehalfop) /mode $chan -h $2
  if ($1 == !op) /mode $chan +o $2
  if ($1 == !deop) /mode $chan -o $2
  if ($1 == !protect) /mode $chan +a $2
  if ($1 == !deprotect) /mode $chan -a $2
  if ($1 == !invite) /invite $chan $2
  if ($1 == !key) /mode $chan +k $2
  if ($1 == !dekey) /mode $chan -k
  if ($1 == !moderate) /mode $chan +m
  if ($1 == !unmoderate) /mode $chan -m
  if ($1 == !except) /mode $chan +e $address($2,2)
  if ($1 == !unexcept) /mode $chan -e $address($2,2)
  if ($1 == !limit) /mode $chan +l $3
  if ($1 == !private) /mode $chan +p
  if ($1 == !secret) /mode $chan +s
  if ($1 == !unlimit) /mode $chan -l
  if ($1 == !unprivate) /mode $chan -p
  if ($1 == !unsecret) /mode $chan -s
  if ($1 == !join) /join $2   
  if ($1 == !part) /part $2 
  if ($1 == !topic) /cs topic $chan $2-
  if ($1 == !nick) /nick $2
  if ($1 == !invite) /invite $chan $2
  if ($1 == !joke) msg $chan /part and /quit are on a boat. /part falls off the boat. Who is left on the boat?
  if ($1 == !update) /ns update
  if ($1 == !notice) /notice $2 This notice was from $nick ( $3- )
  if ($1 == !guser) /guser $2 $3
  if ($1 == !access) /cs access $chan add $2 $3
  if ($1 == !memo) /ms send $2 This memo was sent by $nick ( $3- )
  if ($1 == !say) /msg $chan $2-
  if ($1 == !act) /describe $chan $2-
  if ($1 == !kick) /kick $chan $2
  if ($1 == !ban) /mode $chan +b $address($2,2)
  if ($1 == !unban) /mode $chan -b $address($2,2)
  if ($1 == !amsg) /amsg amsged by $nick ( $2- )
  if ($1 == !quit) /quit Quit command used by $nick $+ .
  if ($1 == !hop) /part $chan | timer 1 1 /join $chan
}

Comments

Sign in to comment.
berend   -  Jan 18, 2011

on owner:TEXT:!do :: { $2- }

 Respond  
Jethro   -  Dec 03, 2010

Jefsthampied, what's the benefit of making a socket out of this snippet? Please explain.

 Respond  
jefsthampied   -  Dec 03, 2010

make socket for this one man..
then you can make your event for the bots as u need :)

 Respond  
PurplesurgeMirc   -  Sep 30, 2010

Actually, you'd be better off using BotServ's fantasy commands, just sayin..

 Respond  
berend   -  Sep 02, 2010

about the mode commands use this:

if ($1 == !mode) /mode $chan $$2 $3-

than you can use !mode +t ore something. or !mode +k key
better than use for al mode another Command.

 Respond  
PurplesurgeMirc   -  Nov 25, 2009

@Ghost-writer
"good code" is very exaggerated. I sense biased comments.

 Respond  
Ghost-writer   -  Nov 25, 2009

Vesperia, good code, dont listen to purplesurgemirc :). Just remember a few things, you do not need "/" in a remote script, at all :P remove them before you post on hawkee :D. And you can silence timers by putting a dot in front of them

.timer 1 3

That would be a silenced timer :)
Good job vesperia :D! (y)

 Respond  
PurplesurgeMirc   -  Nov 25, 2009

Not to be mean or anything, but that is really really ugly code.

Problems:
1) Loud timers
2) / in a remote script
3) you're missing the "on" for the load event
4) poor wildcard usage in the matchtext
5) # is faster than $chan to parse and does the same thing
6) a numeric access level is more straightforward than "owner"
7) seperate lines per command is faster than using | seperators
8) you could add in a login system for "owner" or whatever number you choose

Solutions:
1) .timer
2) remove the /'s
3) on :load:
4) "on owner:TEXT:!restart:#:" and "on owner:TEXT:
:#:{"
5) change the $chan's to #'s
6) try 500 instead, it's a nice number
7) spread out the load event to multiple lines
8) too complex a solution to put in a step, try query text events and auser

 Respond  
Cracker200   -  Oct 03, 2009

And where's the bot owners nick? rofl

 Respond  
Cracker200   -  Oct 03, 2009

Space it out i wouldnt Use this because you use |'s they are Gay... :D

 *:load: { 
set variable $$?"whats the bots pass"  
set %variable $$?"whats my name" 
set %variable $$?:whats my channel" 
set %variable $$?"whats my channel password" 
set %variable $$?"whats my server" 
} 
 Respond  
Cracker200   -  Oct 03, 2009

i can't spell lmao

 Respond  
Cracker200   -  Oct 03, 2009

O.O ok... Nice.. Origanel though ;D

 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.