mIRC Home    About    Download    Register    News    Help

Print Thread
#219480 20/03/10 04:25 AM
Joined: Oct 2008
Posts: 19
Pikka bird
OP Offline
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..

russkris22 #219482 20/03/10 04:31 AM
Joined: Oct 2008
Posts: 19
Pikka bird
OP Offline
Pikka bird
Joined: Oct 2008
Posts: 19
I have been to http://www.mircscripts.org/ but that just confused me

russkris22 #219483 20/03/10 05:16 AM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Code:
on $*:action:$(/(slaps? \Q $+ $me $+ \E)/iS):*: {
  describe $iif(#,#,$nick) slaps $nick back with a large trout!
}

Tomao #219492 20/03/10 09:58 AM
Joined: Oct 2008
Posts: 19
Pikka bird
OP Offline
Pikka bird
Joined: Oct 2008
Posts: 19
Thank you very much.

Where do I put that

russkris22 #219499 20/03/10 04:08 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
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
russkris22 #219506 20/03/10 07:10 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
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.
Code:
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.

Tomao #219510 20/03/10 08:10 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Edit - Changed it to $wildsite instead of $nick

Tomao #219514 20/03/10 09:56 PM
Joined: Feb 2009
Posts: 133
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2009
Posts: 133
why hinc? why not /hadd -mu2

Code:
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
chacha #219516 20/03/10 10:06 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Well, is there a difference in functionality? smirk Plus I was attempting to match wildsite per nick...your suggestion halts the script for 2 seconds before every one can use it again.

Tomao #219519 20/03/10 10:13 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
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.

Code:
  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
Riamus2 #219521 20/03/10 10:23 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Ok Riamus2 fair enough.

Tomao #219527 21/03/10 02:27 AM
Joined: Oct 2008
Posts: 19
Pikka bird
OP Offline
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

russkris22 #219528 21/03/10 04:16 AM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
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.

Tomao #219565 21/03/10 10:20 PM
Joined: Nov 2003
Posts: 67
C
Babel fish
Offline
Babel fish
C
Joined: Nov 2003
Posts: 67
Originally Posted By: Tomao
Code:
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
Canario #219567 21/03/10 10:27 PM
Joined: Jul 2006
Posts: 4,141
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,141
Originally Posted By: /help Prefixes
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

Link Copied to Clipboard