Yeah, but doing with variables is much more cleaner:
Code:
On *:TEXT:!emo*:#:{
if ($2 !ison #) {
.notice $nick Sorry $nick $+ , $2 is not on $chan
}
else {
set %number = $rand(0,100)
.timer 1 1 msg $chan Testing for $2 $+ \'s emoness ...
.timer 1 3 msg $chan $2 is %number $+ %
unset %number
}
}
No need of /set. ;x Also, for a code like this, variables shouldn\'t be needed because it isn\'t that complicated. Just pointing stuff out.
Instead of using /inc and an extraordinarily long variable, why not use /set %currentplayer $nick and change the if event to
if (%currentplayer (!)= $nick) { etc }
Also, there is no need to use a local variable and $gettok, why not just make an alias that does that? I made one:
alias -l rprop { return $($+($,$r(1,$0)),2) }
Basically returns a random token out of the string. For example: $rprop(testing,this,alias) could return testing, this, or alias. So you could make the $gettok and local variable to $rprop(kiss,kiss,smooch,etc,etc). But that\'s what I would do and you don\'t necessarily have anything wrong with your code. Just some suggestions. Good job and nice idea though. I might make a snippet like this even though their are millions of spin the bottle snippets out there. ;]
if i give it a 10 i might get yelled at from hawkee for such little coding :)
I\'m not really saying you should give this a ten lol. But, it wouldn\'t hurt to review this snippet a bit and rate it based on what you find. =D On the contrary, your opinions are not my decision. So whatever you rate it is based on what you look for in a snippet. So eh, w/e. ;)
Hmm, this isn\'t really a spam detector or anything, just a query blocker. If you meant to make it a query blocker, why not just decline all messages? You should also include the on *:open event. When first opening queries. Then you wouldn\'t have to use the on text event at all.
@ the code, you aren\'t unsetting variables, and why not store these nicks in an ini file or txt file and use $read/$readini to check? It\'d be pretty cool to include a dialog, but that isn\'t imperative. One last thing, you should use groups to disable/enable the snippet. ;)
I must say this is a pretty useful snippet for filtering out those txt files that aren\'t needed. One thing that disappoints me is the appreciation this snippet receives. I would, well right now, rate this a 6. It makes me wonder how people rate snippets.
Anyway, it would be interesting if you could display the file\'s data in a new dialog or an expansion to the current dialog. I don\'t really see a use of resizing the dialog with a button when you can directly list them. ;) It would be great to have this support other file types, and just include it in one pack. But I\'d have to say this is pretty nice, good work Scakk.
@guest598594 I prefer just normal Mountain dew. I\'m not really into the MANY other flavors of sodas. ;)
Why not use this:
alias quote {
if ($1 isnum && $read(quotes.txt,$1)) {
msg $iif($active != status window,$active,$chan) Quote number $+($chr(40),$1,$chr(41),:) $v2
}
else {
msg $iif($active != status window,$active,$chan) Total quotes: $lines(quotes.txt)
}
}
alias addquote {
if ($1- && $exists(quotes.txt)) {
write quotes.txt $1-
echo $colour(info) -a Quote added.
msg $iif($active != status window,$target,$chan) Quote $1- added.
}
}
alias delquote {
if ($1 isnum && $read(quotes.txt,$1)) {
write -dl quotes.txt $1
echo $colour(info) -a Quote deleted.
msg $iif($active != status window,$target,$chan) Quote number: $1 deleted.
}
}
And just make a file named quotes.txt in your mircdir. Commands: /delquote (num), /addquote (quote), /quote (num)
1) Why not use groups when disabling/enabling the script? And since you plan to echo in a channel, why not make it menu channel { because I could turn it off in a query or in the status window.
2) One thing I really don\'t like in this snippet is the connect event, but it\'s not really imperative that you remove that.
3) Could be simplified (would provide an example but Lindrian has that covered ;))