Auto join after kick/ Ban too

By DeShOnAr2 on Oct 23, 2009

This easy script lets you join after being kicked

on *:kick:#: {
  if ($knick == $me) { /join # }
}

on *:ban:#: {
  if ($bnick == $me) { /unban # }
}

Comments

Sign in to comment.
Jethro   -  Oct 25, 2009

Aucun50, I do use brackets, but with a short code, they are not needed. It depends on the circumstances where brackets must be used. And you have RusselB's coding "pattern" wrongly claimed. He often codes it as such, for instance:

if aucun50 ison $chan { ... }

where parentheses are void. But there are times he DOES use parentheses and brackets side by side. There's no definite proof that, without using the brackets, will make your PC work harder. I'll take that as a hearsay.

P.S. If you've read mirc's help file, you'll find that there are many examples without the use of {} and usually they're a line of codes to show how an event works.

 Respond  
Aucun50   -  Oct 25, 2009

Where do you think it's some how better to not have { } after your if statements? Not having { } SLOWS down your script so does the "if %1>%2", your just making your computer do more work when it shouldn't have to.

/me thinks you have been reading RusselB's scripts to much

 Respond  
slub77   -  Oct 24, 2009

0-0

 Respond  
Jethro   -  Oct 23, 2009

$bnick would actually become $null if the $banmask itself didn't include a nickname. It'd be best to use:

if ($banmask iswm $address($me,5))
 Respond  
Ghost-writer   -  Oct 23, 2009

//cs kick $chan You | mode $chan +b $address(you,3), i banned after i kicked but you never saw the ban so you cant unban :| 3 points for effort, 1 point lost for misuse of brackets :(

on *:kick:#: {
  if ($knick == $me) { /join # }
}

on *:ban:#: {
  if ($bnick == $me) { /unban # }
}

Could of been better, like so :O

on *:kick:#: {
  if ($knick == $me) join # 
}
on *:ban:#: {
  if ($bnick == $me) unban #
}

No need for / in a script, mirc defaults it, and if its only 1 command you do not need brackets to do it, brackets are for a string of commands :). sooo, 3 :).

 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.