mIRC Home    About    Download    Register    News    Help

Print Thread
can i use SAJOIN like this in code #134266 30/10/05 10:17 AM
Joined: Oct 2005
Posts: 51
S
stickydank Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Oct 2005
Posts: 51
well i just edited this
on the on kick part
i added /sajoin 2 it
because im a irc op and was thinking it would work
just incase some1 esles script protection got a ban on me
the sajoin would let me in i tried the chanserv unban me
but didnt work so heres code any in put would be great
Code:
  

on *:BAN:#: { 
  if (%bp.st == on) { 
    if ($me == $nick) { return } 
    if ($me isop $chan) && (%bp.p == d) && ($banmask iswm $address($me,5)) { mode $chan -bbb $banmask | mode $chan -aohv $nick $nick $nick $nick | msg $nick %bp.kmsg } 
    if ($me isop $chan) && (%bp.p == k) && ($banmask iswm $address($me,5)) { mode $chan -bbb $banmask | mode $chan -aohv $nick $nick $nick $nick | mode $chan -bbb $banmask | kick $chan $nick | msg $nick %bp.kmsg } 
    if ($me isop $chan) && (%bp.p == kb) && ($banmask iswm $address($me,5)) { set %nickk $nick | mode $chan -bbb $banmask | mode $chan -aohv+bbb %nickk %nickk %nickk %nickk $address(%nickk,2) $address(%nickk,9) %nickk | kick $chan %nickk | msg %nickk %bp.kmsg | unset %nickk $nick } 
  } 
} 
on *:KICK:#: { 
  if (%bp.st == on) { 
    if ($me == $nick) { return } 
    if ($knick == $me) { join $chan | /sajoin $chan $me | set %nickk $nick | mode $chan -aohv+bbb %nickk %nickk %nickk %nickk $address(%nickk,2) $address(%nickk,9) %nickk | kick $chan %nickk } 
    elseif { mode $chan -aohv+bbb %nickk %nickk %nickk %nickk $address(%nickk,1) $address(%nickk,9) %nickk | kick $chan %nickk | msg %nickk [What The F? Dont kick ME!! PshR script] | unset %nickk $nick } 
  } 
} 
on *:DEOP:#: { 
  if (%bp.st == on) { 
    if ($me == $nick) { return } 
    if (deop == $me) { /msg chanserv op $chan $me | set %nickk $nick | mode $chan -aohv+bbb %nickk %nickk %nickk $address(%nickk,2) $address(%nickk,9) %nickk | msg %nickk [What The F? Dont Deop ME!! PshR script] | unset %nickk $nick } 
  } 
 

and on the on kick i put a elseif 2 start second code for when they rejoin
should i mayb use a timer there like this

elseif { /timer 0 1 | mode $chan -ohv+bbb
im not sure im still tring

Re: can i use SAJOIN like this in code #134267 30/10/05 10:52 AM
Joined: Feb 2005
Posts: 342
R
Rand Offline
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
This is your old thread.

Now since I have time, I'll give you an explanation. No you can't do that, not without using a timer. You can't kick a person without being in a channel, and since you're NOT in the channel when you get *kicked*, even SAjoin won't put you in there before your script attempts to de* the nick and kick them.

You should try small tests if you don't believe this. Use two clients, or two open server windows, that way you can monitor it on a second nick.

Code:
on *:kick:#: {
  if ($me == $nick && $knick == $me) {
    ; put your /sajoin command here
    msg # am I in this channel yet?
  }
}


This will explain why your code isn't working. Go ahead and kick yourself. Watch on your second client/server's window, to see if your nick says "am I in this channel yet?"

Re: can i use SAJOIN like this in code #134268 30/10/05 03:50 PM
Joined: Apr 2004
Posts: 759
M
Mpdreamz Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
Or to be even safer Sajoin on kick set a %var then on join if $nick == $me && that %var excists do your protections and unset that var.


$maybe
Re: can i use SAJOIN like this in code #134269 31/10/05 04:41 AM
Joined: Feb 2005
Posts: 342
R
Rand Offline
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
Read the original thread, that's what I did. =]