realname ban

By Disturber on Nov 16, 2009

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
}

Comments

Sign in to comment.
Jethro   -  Nov 23, 2009

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.

 Respond  
Master-Of-Death   -  Nov 23, 2009

who's chinese? lol...i thought this was a site for scripting, not guess the nationality? lol

 Respond  
blitzz   -  Nov 23, 2009

Pergh! What Chinese? Where?...:P

 Respond  
Jethro   -  Nov 23, 2009

Is that a some sort of Chinese pronunciation? And Cracker200, aren't you from China as indicated on your profile? lol

 Respond  
Master-Of-Death   -  Nov 23, 2009

huh? :D

 Respond  
Cracker200   -  Nov 22, 2009

Lol wtf?

 Respond  
Blogger   -  Nov 22, 2009

Lontong

 Respond  
Cracker200   -  Nov 22, 2009

^

 Respond  
Ghost-writer   -  Nov 21, 2009

post on forums when you want somone to finish a code for you.

 Respond  
Disturber   -  Nov 21, 2009

@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

 Respond  
PePpEr   -  Nov 20, 2009

LOL!

 Respond  
Master-Of-Death   -  Nov 20, 2009

lmao

 Respond  
Jethro   -  Nov 20, 2009

Gee, gooshie, your gooshi-lization is unbeatable. lol

 Respond  
gooshie   -  Nov 20, 2009
alias rb hadd -m bchan $1 # | who $1
raw 352:*: {
  if $hget(bchan,$6) {
    mode $v1 +b $+(~r:,$replace($9-,$chr(32),_))
    kick $v1 $6 banned
    hfree bchan
  }
}
 Respond  
Jethro   -  Nov 20, 2009

cessil, you put an 'on' in front of a raw event.

 Respond  
cessil   -  Nov 19, 2009

here's a basic thing of what you're trying to do

 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 oops "on" deleted

 Respond  
Cracker200   -  Nov 19, 2009

Lol

 Respond  
sunslayer   -  Nov 19, 2009

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'

 Respond  
Cracker200   -  Nov 19, 2009

Lol P0tat3rs is a awesome scripter =D
I've known him long enough to know that o.O

 Respond  
p0tat3rs   -  Nov 19, 2009

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.

 Respond  
Ghost-writer   -  Nov 19, 2009

^ i like this kid.

 Respond  
Serpentsounds   -  Nov 18, 2009

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.

 Respond  
sunslayer   -  Nov 18, 2009

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-

 Respond  
Cracker200   -  Nov 18, 2009

@Disturber I never said it'd work it just looks betta that way xD
/me pee's on p0tat3rs
:D

 Respond  
p0tat3rs   -  Nov 18, 2009

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

 Respond  
Sorasyn   -  Nov 18, 2009

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.

 Respond  
sunslayer   -  Nov 17, 2009

@Xpl0reR this is his first post and he probably just started msl. every1 makes a "Stupid and irrational code" when their learning

and FYI there is a 0, don't rate it.

 Respond  
Ghost-writer   -  Nov 17, 2009

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.

 Respond  
xplo   -  Nov 17, 2009

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

 Respond  
Disturber   -  Nov 17, 2009

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...

 Respond  
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.