this version of the code works now,thx everyone for help
code finished by cessil
/rb nick <-- does a real name ban
raw 311:*: {
if (%banchan != $null) {
set %realname $6 $+ *
mode %banchan +b ~r: $+ %realname
kick %banchan $1 banned
unset %banchan
}
}
alias rb {
set %banchan $chan
whois $1
}
lol well I thought the word "lontong" by Blogger sounded Chinese, but after I checked the meaning of it, and I quote, > it stands for an Asian dish made of compressed rice that is then cut into small cakes. While I don't understand Indonesian, I also found out that In Indonesia, the term Lontong is used as slang of Tolong (help) It was created by spliting the word and was used by comedians (mainly those which act as sissy).Now, that's interesting.
Even though mIRC gets arguments based on the space, it doesn't exclude the space from the string.it does actually remove the delimited token, using the '-' makes mIRC append each token with the space char.
//tokenize 44 one,two | echo $1 $+ $2
returns onetwo, not 'one,two' whereas $1-2 will return 'one two'
A few pointers:
If you are looking for help, don't post in the snippets section, post in the MSL help on the forums. This is more for completed code that users can make use of.
If you are posting a snippet, make sure you don't leave debug code in (looking at "echo -a test").
Now, specifically about your script, you execute a ban and kick immediately after the whois command. So, this would be done before your communications with the server ever finished. You would need to move the kicking and banning to when the raw is received, so the realname correctly matched the user. You would need to temporarily store things like channel name, and add a flag in the form of an enabled group, variable, etc. so that the ban isn't attempted with each arbitrary whois command.
At the above comment, look closely at his writing, it's $6- rather than $6, so it will return multiple words. :P And at the OP, that bit of code in question here is a better idea than throwing in wildcards, since it is more precise to each user, and doesn't assume that the realname is >=2 words.
Also any realname that is longer than two args is automatically wildcarded, this could result in other users being banned, not typical, but still a possibility, try "set %realname $replace($6-,$chr(32),_)" that'll automatically format the banmask into arg1_arg2_arg3, etc.i may be interpreting that wrong but $6 cant have a space in it becase mIRC automatically space-delimits $1-
Learn to use $+(arg,arg), as opposed to arg $+ arg, it'll make your code look neater, and easier to debug with larger strings, along with not using the "|" character, it looks messy as hell when you have lines upon lines of code with those in them. Also any realname that is longer than two args is automatically wildcarded, this could result in other users being banned, not typical, but still a possibility, try "set %realname $replace($6-,$chr(32),_)" that'll automatically format the banmask into arg1_arg2_arg3, etc. Last but not least, place your closing bracket on a separate line :P
Cracker200 this one you gave me doesn't work for me...
[13:39:04] • [Error]: Unknow command "11::echo"
[13:39:04] «Ban» Nick1 sets +b ~r:_
===================================================
thats all am getting from that... if anyone else has some suggestion...i don't know how else to put +b ~r: without ailiases...