mIRC Homepage
Posted By: yugioh a ban kick remote - 10/05/03 05:21 PM

alias kb { .mode # +b $1 | .ban # $1 | .msg $bnick are you be banned from

its done ok?

thnx

msg $bnick are you be banned from

it is the right form to do it?
Posted By: codemastr Re: a ban kick remote - 10/05/03 05:24 PM
Actually, most of that is wrong. There is no code there that actually does any kicking, instead you set +b 2 times, and $bnick isn't valid in an alias.

kb { .ban # $$1 3 | .kick # $$1 Banned }
Posted By: Prizm Re: a ban kick remote - 10/05/03 05:27 PM
Why do you prefix ban and kick with a period? It has no effect on those commands at all. It's useless.
Posted By: codemastr Re: a ban kick remote - 10/05/03 05:31 PM
So, big deal? He had them in his original, I included them in mine. Having them there won't hurt anything. I always include them, perhaps somewhere down the road Khaled will make one of those commands display something that a . prevents, why should I go through all my scripts and change it if such a thing happens when I can much more easily just include the . now? It's an extremely moot point. If he doesn't want them, then he can remove them. But seeing as how he had them in his original paste, I'd assume, for whatever reason, he wants them. Perhaps /ban is an alias he created that does something different than the standard mIRC /ban and therefore the . does play a role.
Posted By: Prizm Re: a ban kick remote - 10/05/03 05:34 PM
Actually there's no big deal. I just think clean code and leaving useless items out are better. That's just my opinion.
Posted By: KingTomato Re: a ban kick remote - 10/05/03 06:31 PM
Why do ppl use /'s in scripts when its useless.. I for one use the forward slash, and don't deem it "useless". Its not bad to get into some habits, as well as make things more comprehendable. Esp on a long like, the /'s emphasize that its a command, and not just text.
Posted By: BoXeRn_ Re: a ban kick remote - 10/05/03 07:14 PM
kb { .mode # -o+b $1 1 | .kick # $1 $2- }
;This Code U Can Add A Reason, And You Deop The Nick At
; The Same Time.
;Prefix /kb <nick> <reason>
cool
Posted By: codemastr Re: a ban kick remote - 10/05/03 07:36 PM
and it also doesn't work wink

kb { .mode # -o+b $1 $1 | .kick # $1 $2- }
Posted By: Prizm Re: a ban kick remote - 10/05/03 11:34 PM
It looks more professional not to prefix a command with a / in a script.
Posted By: neophyte Re: a ban kick remote - 11/05/03 02:48 AM
Code:
alias kb {
  if ($left($1,2) == -u) {
    if ($3 isnum 0-9) {
      if ($4 != $null) {
        ban $$1 $chan $$2 $$3
        if ($2 ison $chan) { kick $chan $$2 kb $$4- }
        halt
      }
      else {
        ban $$1 $chan $$2 $$3
        if ($2 ison $chan) { kick $chan $$2 kb $me }
        halt
      }
    }
  }
  if ($left($1,2) == -u) {
    if ($3 != $null) {
      ban $$1 $chan $$2
      if ($2 ison $chan) { kick $chan $$2 kb $$3- }
      halt
    }
    else {
      ban $$1 $chan $$2
      if ($2 ison $chan) { kick $chan $$2 kb $me }
      halt
    }
  }
  if ($2 isnum 0-9) {
    if ($3 != $null) {
      ban $chan $$1 $$2
      if ($1 ison $chan) { kick $chan $$1 kb $$3- }
      halt
    }
    else {
      ban $chan $$1 $$2
      if ($1 ison $chan) { kick $chan $$1 kb $me }
      halt
    }
  }
  if ($2 != $null) {
    ban $chan $$1
    if ($1 ison $chan) { kick $chan $$1 kb $$2- }
    halt
  }
  else {
    ban $chan $$1
    if ($1 ison $chan) { kick $chan $$1 kb $me }
    halt
  }
  halt
}



I use this because it supports all the switches that the /ban command has.

There probably is a simpler way to do it, but I cbf looking around for it.


this is how you use it:


/kb -uN nickname mN reason


the -uN and mN are completely optional, as is the reason.

-uN is the timer for the ban, useage is like this: -u60 (bans for 60 seconds, and then removes the ban).

mN is the mask number, useage is a number between 0-9. read the help file for information on $masks (this will explain the mask type for each number.


for instance if i did this:


/kb -u3600 peter 3 this client sucks


this would ban that nickname with the mask *!*user@*.host for an hour, with the reason "this client sucks"
© mIRC Discussion Forums