mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
Say I had a quake 2 related channel. (the game.) And had it sett to -t ..

But this one kid, avoids ban, and come in and always sett the same topic. Say he set: "toyman rules"
"toyman is the best"

Etcetera..

Is there a script, that could detect that word, and automatically reset the topic to something I have premade?


Like if he sat any topic containing the word 'toyman', I would immediately reset it to something like; "Feel free to set any topic relevant to quake 2, it might spark an interesting chat!" ..

PS: Also it would be nice if it would set the channel +t for a random time, between 10 seconds and 1 minute.. But that is not needed. smile





I know I could just set it to +t .. But it is sad that one kid shall be able to ruin an open channel like this..


Alternatively, is there a script that; every time a "nickname" set any topic, ... makes me reset it, and ban the person?

Last edited by gomp; 29/04/10 12:48 PM.

I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I don't have mIRC in front of me to get the exact format, but use /help on topic . I'm pretty sure that's a valid event.


Invision Support
#Invision on irc.irchighway.net
Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
The code should be self-explanatory...
Code:
on *:TOPIC:#channel:{
  if ($nick == personsnick) { mode $chan +b $address($nick,2) | kick $chan $nick You're banned from setting a topic | topic $chan Your new topic here }
  elseif (toyman isin $1-) { mode $chan +t | .timer 1 $rand(10,60) mode $chan -t | topic $chan Feel free to set any topic relevant to quake 2, it might spark an interesting chat! }
}

Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
Thanks a lot! laugh

Seems to be just what I am after.

I'll implement it now.

Edit: Tested it now, it seems to be just what I needed! Thanks a lot! Tell me if there is anything I can do for you, back! laugh

Last edited by gomp; 29/04/10 02:05 PM.

I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
If he uses multiple nicknames. Like "toyman", "toyM4n", etcetera..

How would I add those in that script?

Just add it several times with different nick? Or would that conflict?

I understood that code, and edited in the things, thanks for making it so obvious!

But unsure how to make it work for multiple nicks. smile

Thanks again though! I usually have a hard time making myself understood in English. But you got it! laugh


I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
Joined: Mar 2004
Posts: 526
Fjord artisan
Offline
Fjord artisan
Joined: Mar 2004
Posts: 526
Originally Posted By: gomp
If he uses multiple nicknames. Like "toyman", "toyM4n", etcetera..

How would I add those in that script?

Just add it several times with different nick? Or would that conflict?

I understood that code, and edited in the things, thanks for making it so obvious!

But unsure how to make it work for multiple nicks. smile

Thanks again though! I usually have a hard time making myself understood in English. But you got it! laugh


from /help if

'Combining comparisons

You can combine comparisons by using the && for AND and || for OR characters.'

so...


try if ( ($nick == nick1) || ($nick == nick2) || ($nick3 == nick3 ) )

NOTE: if comparison starts with (( and last ends with )) to make it a group of comparisons to make..

Hope this helps, and I would suggest you start to use /help from
within mIRC.. everything you need to know is in there for future scripting.



Help others! It makes the world a better place, Makes you feel good, and makes you Healthy!
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
I did not fully understand that.. But I shall test it now. And thank you! smile

Edit: I have now tested it, and much more.. But I can only make it work with one nick.. :|

Last edited by gomp; 29/04/10 04:02 PM.

I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
Joined: Feb 2009
Posts: 133
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2009
Posts: 133
what about $istok(nick1.nick2.nick3,$nick,46)


WorldDMT
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Maybe HorseC was trying to be basic or rudimentary so newbies understand better.

Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
Originally Posted By: Tomao
Maybe HorseC was trying to be basic or rudimentary so newbies understand better.


I do not understand much coding. But that code from 5618 was very easy to understand.

I only wish I had asked for it to include several nicknames. frown

I shall try the suggestions above here today though! I hope it works. laugh


I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
Originally Posted By: chacha
what about $istok(nick1.nick2.nick3,$nick,46)


That worked! laugh

Thanks a lot!

Is there a limit to how many nicks one can add that way? smile


I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
As many as you like... up to the line length limit in mIRC (which on 6.35 and newer is something like 4000 characters). You'll know if you reach it because you'll get a line too long error message when trying to run it.


Invision Support
#Invision on irc.irchighway.net
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
Neat!

Thanks a lot to all you who helped me make this script! it works perfectly! laugh


I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.

Link Copied to Clipboard