|
Joined: Oct 2008
Posts: 19
Pikka bird
|
OP
Pikka bird
Joined: Oct 2008
Posts: 19 |
Hello,
I am still kind of new to mIRC.
Just wondering if anyone could help me with some slap commands, so return slaps if someone slaps me.
Or just some good fun commands..
|
|
|
|
Joined: Oct 2008
Posts: 19
Pikka bird
|
OP
Pikka bird
Joined: Oct 2008
Posts: 19 |
I have been to http://www.mircscripts.org/ but that just confused me
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
on $*:action:$(/(slaps? \Q $+ $me $+ \E)/iS):*: {
describe $iif(#,#,$nick) slaps $nick back with a large trout!
}
|
|
|
|
Joined: Oct 2008
Posts: 19
Pikka bird
|
OP
Pikka bird
Joined: Oct 2008
Posts: 19 |
Thank you very much.
Where do I put that
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Be aware that any script like that can be used against you to get you flooded off the network over and over until you get banned. It just takes a few people typing that multiple times and you'll be replying over and over and over. If you absolutely must have such a script (I don't recommend it), you should at least put in some protections to avoid that problem.
Scripts go in Remotes - (Alt-R)
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
Script goes in your mirc Remotes - (Alt-R) I added a flood control to prevent you from being flooded. People can only slap you once every 8 seconds. on $*:action:$(/(slaps? \Q $+ $me $+ \E)/iS):*: {
if (!$hget(fc,$wildsite)) { hinc -mz fc $wildsite 8
describe $iif(#,#,$nick) slaps $nick back with a large trout!
}
} Now it's recommendable to be used without the worry of floods.
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
Edit - Changed it to $wildsite instead of $nick
|
|
|
|
Joined: Feb 2009
Posts: 133
Vogon poet
|
Vogon poet
Joined: Feb 2009
Posts: 133 |
why hinc? why not /hadd -mu2 on $*:action:$(/(slaps? \Q $+ $me $+ \E)/iS):*:{
if !$hget(ant,fld) {
hadd -mu2 ant fld 1
describe $iif(#,#,$nick) slaps $nick back with a large trout!
}
}
WorldDMT
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
Well, is there a difference in functionality?  Plus I was attempting to match wildsite per nick...your suggestion halts the script for 2 seconds before every one can use it again.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Why use hash tables at all? If you block it only per nick (or $wildsite), it will still allow a group of people to flood you off. There's not really any benefit to allowing you to display the reply to multiple people at once. So... just use a variable. It's more efficient than creating a hash table just to see if it's being flooded.
if (!%slap.flood) {
set -u2 %slap.flood On
describe ....
}
Though I'd still recommend more than 2 seconds. It doesn't exactly look good to reply every 2 seconds with slaps. 10 seconds would be a good minimum imo.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
|
|
|
|
Joined: Oct 2008
Posts: 19
Pikka bird
|
OP
Pikka bird
Joined: Oct 2008
Posts: 19 |
Oh dear.. you have confused me// Thanks for the help, but I will leave it out..
Best if I stay away from things that will cause problems
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
There's no problem with the code I provided. Riamus2 was then suggesting the possibility of people flooding you out by doing the /me slaps you command repeatedly or by a group of people with a bad intention, while you have the code placed in mirc remote. Then there followed ChaCha's suggestion for me to do it another way.
I don't suppose the chances of that possibility is great anyway, unless you have had a beef with folks that have "real issues" with you, and that they know enough of MSL to tamper with the code.
Other than that, you're relatively safe to use the code the way it is without flood control added.
|
|
|
|
Joined: Nov 2003
Posts: 67
Babel fish
|
Babel fish
Joined: Nov 2003
Posts: 67 |
on $*:action:$(/(slaps? \Q $+ $me $+ \E)/iS):*: {
describe $iif(#,#,$nick) slaps $nick back with a large trout!
} What is the $ prefix purpose?
irc.universochat.net #escripting
|
|
|
|
Joined: Jul 2006
Posts: 4,212
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,212 |
The $ prefix Indicates that the matchtext section of a definition contains a regular expression.
Last edited by Wims; 21/03/10 10:27 PM.
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
|