Snippet 1 Add your topic
Snippet 2 Add channel topic
All you have to do is paste it in remote and type !topic to view the topic set and !topic to set a new topic. Bot must be a mod and You must be a mod.
Send me comments on what you want me to make
on 1:TEXT:!mytopic:#:{
if (!%mytopic. [ $+ [ $nick ] ]) { msg # $nick -> No topic is currently set. }
else { msg # Topic: $qt(%mytopic. [ $+ [ $nick ] ]) }
}
;-------------------
; Set New Topic
;-------------------
on 1:TEXT:!mytopic *:#:{
if ($me isreg # && (($nick isreg #) || ($nick isin #))) {
set %topic. [ $+ [ $nick ] ] $2- - (set by $nick $+ )
msg # [my Current topic] %mytopic.
}
;leave comment if does not work
on 1:TEXT:!topic:#:{
if (!%topic. [ $+ [ $chan ] ]) { msg # $nick -> No topic is currently set. }
else { msg # Topic: $qt(%topic. [ $+ [ $chan ] ]) }
}
;-------------------
; Set New Topic
;-------------------
on 1:TEXT:!topic *:#:{
; Checks to see if I am an op and the user is an op.
; If the user's name is the same as the channel, it will also work.
if ($me isop # && (($nick isop #) || ($nick isin #))) {
set %topic. [ $+ [ $chan ] ] $2- - (set by $nick $+ )
msg # [Current topic] %topic.
}
elseif ($me !isop # && $nick isop #) { msg # [ $nick ] I must be a moderator of the room to change the topic for you sorry. }
elseif ($nick !isop #) { msg # [ $nick ] You are not an op in this channel sorry Do good maybe you will become one }
else return
}
;Thanks to curtisal and cantthink96