!topic

Platform:  mIRC
Published  Feb 07, 2004
Updated  Mar 08, 2005
A very simple snippet that can be loaded on a bot, to allow people to change a channel's topic by messaging the bot. As it is, any user can message the bot and get it to change the topic - this can of course be restricted in a variety of ways (user levels, nicks, etc.) ; Goes in remotes (alt-R). Usage:
; !topic New topic - when typing it in a channel
; !topic #channel New topic - when private messaging the bot

ON *:TEXT:!topic *:*: {
if ($chan) {
topic $chan $2-
}
else {
topic $2 $3-
}
}

Comments

Sign in to comment.
Pangaea   -  Mar 22, 2012
wonderful stuff grim
thanks so much for the help on this :)

regards
 Respond  
GrimReaper   -  Mar 22, 2012
Best thing to do in the case of multiple nick is to use:

Code

 


The | is the seperation character, In this case I use $chr(124) hence the 124 at the end, You can use any other seperation character that isn't a comma/$chr(44)
 Respond  
Pangaea   -  Mar 22, 2012
hehe, sorry to ask another thing, but i just cant understand why the most "seemingly" simple things dont work

if ($nick == pangaea, pantest3) {
if i do that its not working on either nicks.. god i suck so badly
 Respond  
Pangaea   -  Mar 22, 2012
er my bad, its a worker now
 Respond  
Pangaea   -  Mar 22, 2012
thanks grim, tho funnily enough I had it originally at == and thought to take out one of the = since it wasn't working then either :/
 Respond  
GrimReaper   -  Mar 22, 2012
@Pangaea add another = so it looks like if ($nick == Pangaea) { as the = on it's own doesn't work within if statements afaik. I know they do in temp variables. :)
 Respond  
Pangaea   -  Mar 22, 2012
Heya, nice work, how would i go about making it work for specific nicks..
i tried this as a test
ON *:TEXT:!topic *:*: {
if ($nick = pangaea) {
...etc etc

but its not working
 Respond  
mountaindew   -  Oct 22, 2007

Code

 

u can just do $2-
 Respond  
CRadle_of_filth   -  Apr 08, 2004
okay
 Respond  
tye   -  Apr 08, 2004
The point of the code is to allow other people to set the topic. For example, you might put this command in a bot\'s remotes.
 Respond  
CRadle_of_filth   -  Apr 08, 2004
whats the point of this code when you can set the topic yourself?
 Respond  
UTUCS.com-Admin   -  Feb 19, 2004
To restrict it for nicks, use: ON *:TEXT:!topic *:*:if ($chan) && ($nick == somenick) { topic $chan $2- } for channel message only
 Respond  
Snuske   -  Feb 10, 2004
Snuskebabb
 Respond  
sailoreagle   -  Feb 07, 2004
Yup. \"React to text !topic followed by a space and then anything, doesn\'t matter whether in a private message or a channel\".
 Respond  
UTUCS.com-Admin   -  Feb 07, 2004
Oh, I get it, it\'s wildcard, private message or channel.
 Respond  
UTUCS.com-Admin   -  Feb 07, 2004
What is ON *:TEXT:<text> *:*:?
 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.