mIRC Home    About    Download    Register    News    Help

Print Thread
#58524 30/10/03 10:56 PM
Joined: Oct 2003
Posts: 14
P
Pikka bird
OP Offline
Pikka bird
P
Joined: Oct 2003
Posts: 14
Hello,
I am wondering how exactly to retrieve someone mask via a script, and if the mask is equal to a certain variable that it will perform a function. All help would be appreciated, thank you.
Proselyte

#58525 30/10/03 11:33 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Code:
if ( %var == $address($nick,5) ) {
  dostuff
}

#58526 31/10/03 03:59 AM
Joined: Oct 2003
Posts: 14
P
Pikka bird
OP Offline
Pikka bird
P
Joined: Oct 2003
Posts: 14
on *JOIN:#Test:{
if (%Hate1 == $address($nick,5)) { /mode $chan +b $adress($nick,5) | /kick $chan $nick G'bye m8 }
}

This would work or would it not? And what exactly would %Hate1 have to be? As far as the masks go... there are few masks you can get from someone which one is it exactly? OR for safe measures should I just $address($nick,1-5) ?

#58527 31/10/03 10:11 AM
Joined: Sep 2003
Posts: 98
N
Babel fish
Offline
Babel fish
N
Joined: Sep 2003
Posts: 98
you should also specify on @*JOIN:#Test:{ so the script will only trigger if you are a channel operator


www.stwar.us.to
IRCnet - #stwar
#58528 31/10/03 08:30 PM
Joined: Feb 2003
Posts: 23
C
Ameglian cow
Offline
Ameglian cow
C
Joined: Feb 2003
Posts: 23
btw isin't it on :join:#: ???

And I think you're making a banlist because when I see the var %Hate1,I think there's a %Hate2,3,4,5,6,....

So what you could use is this:
Code:
  
alias addhate { auser hate $addres($1,5) | mode # +b $addres($1,5) | kick # $1 Goodbye m8 }
on @hate:JOIN:#:{ mode # +b $address($nick,5) | kick # $nick Goodbye m8 }

/addhate nickname and the nick will get banned and kick out of the channel.
(You can do this as much as you want.)
Next time the nick rejoins he/she will get banned and kicked.

#58529 31/10/03 09:16 PM
Joined: Oct 2003
Posts: 14
P
Pikka bird
OP Offline
Pikka bird
P
Joined: Oct 2003
Posts: 14
I really don't see how that will work. Let me elaborate... What I want is a script that checks everyone's mask as the enter the channel #Test. What I want NOW is an ini file, or whatever file would work best. And if they're mask is in the ini file, it bans and kicks them from #Test. How would I do this?

#58530 01/11/03 02:51 AM
Joined: Jun 2003
Posts: 994
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
Quote:
alias addhate { auser hate $address ($1,5) | mode # +b $address ($1,5) | kick # $1 Goodbye m8 }


That works

Last edited by CtrlAltDel; 01/11/03 02:57 AM.

I refuse to engage in a battle of wits with an unarmed person. wink
#58531 01/11/03 03:31 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Code:
; -----------------------------------------------
; Starup
; -----------------------------------------------

on *:START: {
  /hmake blist 10
  if ($exists(blist.hsh)) /hload blist blist.hsh
}

; -----------------------------------------------
; Cleanup
; -----------------------------------------------

on *:EXIT: {
  if ($hget(blist)) /hsave blist blist.hsh
  /hfree blist
}

; -----------------------------------------------
; Join
; -----------------------------------------------

on me:1:JOIN:#: {
  .timer 1 1 /who $chan
}

on !@*:JOIN:#: {
  if ($hfind(blist, $address($nick, 11), 0, w) > 0) {
    /kick $chan $nick Banned (B-listed)
    /mode $chan +bb $nick $address($nick, 11)
  }
}

; -----------------------------------------------
; Menu
; -----------------------------------------------

Menu Nicklist {
  Blacklist $1
  .$iif($hfind(blist, $address($1, 11), 0, w) > 0, Remove, Add): {
    if ($hfind(blist, $address($1, 11), 0, w) > 0) {
      var %a = 0
      while ($hfind(blist, $address($1, 11), %a, w)) {
        /hdel blist $ifmatch
        /inc %a
      }
      /echo -a [B-list] $1 ( $+ $address($1, 5) $+ ) Removed
    }
    else {
      /hadd blist $address($1, 5)
      /hsave blist blist.hsh
      /kick $chan $1 Banned! (B-listed)
      /mode $chan +bb $1 $address($1, 5)
      /echo -a [B-list] $1 ( $+ $address($1, 5) $+ ) Added
    }
  }
}

; -----------------------------------------------
; Raw Reply
; -----------------------------------------------

raw *:*: {
  if ($numeric == 352) {
    var %chan = $2, %address = $+(*!*,$4), %nick = $6
    if ($me isop %chan) {
      if (($hfind(blist, %address, 0, w) > 0) && (%nick != $me)) {
        /kick %chan %nick Banned! (B-listed)
        /mode %chan +bb %nick %address
      }
    }
  }
  else if ($numeric == 367) {
    var %chan = $2, %address = $3
    if (($me isop %chan) && (%address iswm $address($me, 5))) /mode %chan -b %address
  }
}


That's what you want >:P


-KingTomato

Link Copied to Clipboard