mIRC Home    About    Download    Register    News    Help

Print Thread
#166671 13/12/06 08:42 PM
Joined: May 2005
Posts: 74
D
Dracoz Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: May 2005
Posts: 74
Code:
on *:TEXT:!kickban*:#: {
  if ($2 == $me) {
    ban # $address($nick,2)
    kick # $nick Dont ban me
    cs kick $chan $nick Don't ban me, $nick $+ !
  }
}

But i need something that if this does not work (when i dont got an @ or i dont got acces to chanserv) that it does /mode $me -x join $chan mode $me +x

Can someone script this for me ?
and i know that this is not really scripted well
so if someone could make this better?

kind regards
dracoz

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
This will do what you wanted. I didn't change anything else.

Code:
on *:TEXT:!kickban*:#: {
  if ($2 == $me) {
    if ($me isop $chan) {
      ban # $address($nick,2)
      kick # $nick Dont ban me
      cs kick $chan $nick Don't ban me, $nick $+ !
    }
    else {
      mode $me -x
      join $chan
      mode $me +x
    }
  }
}


Invision Support
#Invision on irc.irchighway.net
Joined: Dec 2006
Posts: 29
B
Ameglian cow
Offline
Ameglian cow
B
Joined: Dec 2006
Posts: 29
Um I really dont get that ..
Can u explain that in other terms?

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
All I did was have it check to see if you were an op. If so, it did what you originally had. If not, it did what you asked to have it do. It's just a normal IF/ELSE statement.


Invision Support
#Invision on irc.irchighway.net
Joined: Dec 2006
Posts: 29
B
Ameglian cow
Offline
Ameglian cow
B
Joined: Dec 2006
Posts: 29
Well Im not an o.p ....
Im just a regular user

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Quote:
But i need something that if this does not work (when i dont got an @ or i dont got acces to chanserv) that it does /mode $me -x join $chan mode $me +x


That makes is sound like you want it to work both when you are an op and when you are not an op, which is what it will do. It'll do the commands that you said you wanted it to do (in the quote I just showed) whenever you are not an op.


Invision Support
#Invision on irc.irchighway.net
Joined: Dec 2006
Posts: 29
B
Ameglian cow
Offline
Ameglian cow
B
Joined: Dec 2006
Posts: 29
ohhh alright i see

Joined: May 2005
Posts: 74
D
Dracoz Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: May 2005
Posts: 74
Thanks man ! this works smile

-Dracoz

Joined: Oct 2003
Posts: 313
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 313
Note that 'join $chan' will make that channel window active and come to the front if it's not the currently active channel. I can see that being very annoying if you're in the middle of typing in a different channel.


Sais
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I just put what he wanted. He could use something like:

if ($chan != $active) { join -n $chan }
else { join $chan }


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard