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
}
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)
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