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,
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).
@cessil thx for help,that one work,'n thx for rest of ya who tried to make it work
btw i dont know where to unfinished codes,i don't know much about scripting and a friend made this one,and asked for my help to find if someone can finish it
Sunslayer, actually $replace($6-,$chr(32),_) will search $6- (note the "-") for an every occurrence of $chr(32) (a space), it will then replace each occurrence with a "_". Even though mIRC gets arguments based on the space, it doesn't exclude the space from the string.
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
Xpl0reR, like sunslayer said he probably just started msl and/or his first post and there no such thing as a stupid or lame code, just some look/function better than others.
whats wrong with crakers XD and disturber, my internet isnt fast enough for me and your forgetting to account server/bnc lag, this probobly wouldnt work for most people.
never post lame crap like this, remember that there ae kids around, and they could learn out of your moment of noobness.. Stupid and irrational code. 1/10 (too bad there is no 0
===================================================
thats all am getting from that... if anyone else has some suggestion...i don't know how else to put +b ~r: without ailiases...
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.