twitch bot to show what server the streamer is on (commonly asked question)
I actually had it working for a while but I seem to have modified it and broke it :/
on *:TEXT:!server *:#: {
if ($2 == help) {
if ($nick isop #) msg $chan !server set - sets a server ||| !server remove will remove server information ||| !server show -OR- !server - shows current server.
}
if ($2 == set) {
if ($nick isop #) msg $chan $nick - The server was set to $3-
if ($nick isop #) set %server $3-
}
if ($2 == remove) {
if ($nick isop #) msg $chan $nick - The server information was removed
if ($nick isop #) set %server currently not being shown
}
if ($2 == show) {
msg $chan $nick - The server is %server
}
if ($2 == $null) {
msg $chan $nick - The server is %server
}
}
is it possible to ONLY have the help / set / remove part of the script work for a specific name (in-case you aren't mod)
I tried a variety of ways but couldn't really get anything to work. for example like this
if ($nick == Playingonehanded) set %server $3-
any help greatly appreciated :)
P.S please point out any nooby mistakes so I can learn!
;;;;;;;Try this. I tested it on my bot and this seems to work fine.;;;;;;;;
on :TEXT:!server :#: {
if ($2 == help) {
if ($nick isop #) msg $chan !server set - sets a server ||| !server remove will remove server information ||| !server show -OR- !server - shows current server.
elseif ($nick == YOURNICKHERE) msg $chan !server set - sets a server ||| !server remove will remove server information ||| !server show -OR- !server - shows current server.
}
if ($2 == set) {
if ($nick isop #) msg $chan $nick - The server was set to $3- | set %server $3-
elseif ($nick == YOURNICKHERE) msg $chan $nick - The server was set to $3- | set %server $3-
}
if ($2 == remove) {
if ($nick isop #) msg $chan $nick - The server information was removed | unset %server currently not being shown
elseif ($nick == YOURNICKHERE) msg $chan $nick - The server information was removed | unset %server currently not being shown
}
}
on *:TEXT:*:#:{
if ($nick isop $chan && $1-2 == !server help) {
msg $chan !server set - sets a server ||| !server remove will remove server information ||| !server show -OR- !server - shows current server.
}
elseif ($nick isop $chan && $1-2 == !server set) {
set %server $3-
msg $chan $nick - The server was set to $3-
}
elseif ($nick isop $chan && $1-2 == !server remove) {
unset %server
msg $chan $nick - The server information was removed
}
elseif ($nick isop $chan && $1-2 == !server show) {
msg $chan $nick - The server is %server
}
elseif ($nick isop $chan && $1 == !server) {
msg $chan $nick - The server is %server
}
}
sorry if there are any
You dont need to type isop everytime also you dont have to check for !server all the time.
on *:TEXT:!server*:#:{
if ($nick isop #) {
if ($2 == help) {
msg # $1 set - sets a server ||| $1 remove will remove server information ||| $1 show -OR- $1 - shows current server.
}
elseif ($2 == set) {
set %server $3-
msg # $nick - The server was set to $3-
}
elseif ($2 == remove) {
unset %server
msg # $nick - The server information was removed
}
elseif ($2 == show) msg # $nick - The server is %server
elseif (!$2) msg # $nick - The server is %server
}
}
on *:TEXT:*:#:{
if ($strip($1) == !server && $nick isop $chan) {
if ($strip($2) == help) {
msg $chan !server set - sets a server $str($chr(124),3) $&
!server remove will remove server information $str($chr(124),3) $&
!server show -OR- !server - shows current server.
}
elseif ($strip($2) == set) {
set %server $3-
msg # $nick - The server was set to $3-
}
elseif ($strip($2) == remove) {
unset %server
msg # $nick - The server information was removed
}
elseif ($strip($2) == show) {
msg # $nick - The server is %server
}
elseif (!$2) {
msg # $nick - The server is %server
}
}
}
thanks a lot.
yours didn't work, but it lead me to why it might have not been working. another part of my bot wasn't bracketed correctly.
so I redid my whole bot and tested each section individually and showed it was one/two scripts messing up other ones. C+P'ed the working ones back in (with yours) and it all works fine :D
so thanks for helping ^_^ even if not in your intented way xD
is there also like a "if ($nick < $level2)" thing with setting users to certain levels? if you know what I mean.