mIRC Home    About    Download    Register    News    Help

Print Thread
protection - help #117046 11/04/05 07:23 PM
Joined: Apr 2005
Posts: 22
T
TyrantX Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Apr 2005
Posts: 22
I'm not even sure if you all help with "kick revenge" stuff, but if you do it would be very much appreciated. Basically i want it to work like so, it only works when i'm opped in the channel i get kicked from hence on @*, If i get kicked by chanserv i want it to simply try to invite me back into the channel, then halt. If i get kicked by a user that is NOT myself, i want it to set variables to identify the channel, the person who kicked me, and the person who kicked me's address. then instead of relying on timers to decide when i will be back in the channel and all that, i want it to work so, as soon as i join the %kchan, it searches for the %knick, and kick bans that person. and if i dont join back in 20 seconds for it to unset all variable. its not working at all, i think it has to do with the halt in the begining. I have been out of scripting forever so im sure my code is probably sloppy. help me out please. here is the code.
---
#Kickpro on
on @*:kick:#:{
if ($knick == $me) && ($nick == Chanserv) { .chanserv invite $chan $me | halt }
elseif ($knick == $me) && ($nick != $me) {
.set %kchan = $chan | .set %knick = $nick | .set %banadd = $banmask $address($nick,3) $address($nick,2) | .chanserv invite %kchan $me | .chanserv deop %kchan %knick | .chanserv unban %kchan $me
}
}
on *:join:%kchan:{
if (%knick isin %kchan) {
.mode %kchan -o+bb %knick %banadd | .raw kick %kchan %knick [Auto][Kick] reason(kick revenge) | .timer 1 20 .unset %kchan | .timer 1 20 .unset %knick | .timer 1 20 .unset %banadd
}
}
#Kickpro end

Re: protection - help #117047 11/04/05 08:03 PM
Joined: Apr 2005
Posts: 22
T
TyrantX Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Apr 2005
Posts: 22
oh and btw, i have an additional code that auto-matically joins into the channel when chanserv invites me, incase you are wondering how i am to get back into the channel.

Re: protection - help #117048 11/04/05 10:24 PM
Joined: Apr 2005
Posts: 22
T
TyrantX Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Apr 2005
Posts: 22
bump - someone? anyone?

Re: protection - help #117049 12/04/05 12:17 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
You have to give us time to read and review your post....3 hours is not much time, and in this forum, multiple postings to a question doesn't "bump" them, but rather, can make it look like it's already been answered.

Code:
 #Kickpro on
on @!*:kick:#:{
if ($knick == $me) && ($nick == Chanserv) {
 .chanserv invite $chan $me
 halt
 }
elseif ($knick == $me) {
.set %kchan = $chan
.set %knick = $nick
.chanserv unban %kchan
.chanserv invite %kchan
.chanserv deop %kchan %knick
} 
}
on *:join:%kchan:{
if (%knick isin %kchan) {
.mode %kchan -o %knick
/ban -k %knick 3 kick revenge
.timer 1 20 .unset %kchan | unset %knick
}
} 
#Kickpro end 
 


I removed the pipes simply to make it easier for me to read and edit. If you want to put them back, it shouldn't matter.
I'm not willing to get things confusing in the few rooms where I have ops, in order to test this, but I think it should work.

Re: protection - help #117050 12/04/05 12:48 AM
Joined: Apr 2005
Posts: 22
T
TyrantX Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Apr 2005
Posts: 22
i really appreciate your help. i tested it and it actually seemed like it was going to work but i got the error messages. -ChanServ- The channel = is not registered.
-
-ChanServ- The channel = is not registered.
-
-ChanServ- The channel = is not registered.
---
so i took out .set $blah = %var , and made it like set $blah %var. and now it wont work at all

Re: protection - help #117051 12/04/05 01:51 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
hes made a tiny typo (set doesnt need = and it ends up in the value) ie if $chan was #blah then %kchan becomes "= #blah" (no " " )

locate in his original code

.set %kchan = $chan
.set %knick = $nick

and change to

.set %kchan $chan
.set %knick $nick

Re: protection - help #117052 12/04/05 05:00 AM
Joined: Oct 2004
Posts: 72
C
captain_comic Offline
Babel fish
Offline
Babel fish
C
Joined: Oct 2004
Posts: 72
But I don't think the part in on JOIN will work. It takes a few seconds before you get @ from chanserv. You should wait for NAMES.

Re: protection - help #117053 12/04/05 06:35 AM
Joined: Apr 2005
Posts: 22
T
TyrantX Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Apr 2005
Posts: 22
Quote:
hes made a tiny typo (set doesnt need = and it ends up in the value) ie if $chan was #blah then %kchan becomes "= #blah" (no " " )

locate in his original code

.set %kchan = $chan
.set %knick = $nick

and change to

.set %kchan $chan
.set %knick $nick


yeah i figured that, i tried that too and it didnt even do anything when i tried testing it.

Re: protection - help #117054 12/04/05 06:52 PM
Joined: Apr 2005
Posts: 22
T
TyrantX Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Apr 2005
Posts: 22
ok, i changed the code around a little. hopeing it would work, and this code to me looks perfect, i have no idea what is wrong. so hopefully someone will help me. test it tell me why it wont work anything.
Code:
#Kickpro on
on @!:kick:#:{
  if ($knick == $me) && ($nick == Chanserv) {
    .chanserv invite $chan $me
    halt
  }
  elseif ($knick == $me) && ($nick != $me) {
    .set %kpchan $chan
    .set %kpnick $nick
    .chanserv unban %kpchan
    .chanserv invite %kpchan
    .chanserv deop %kpchan %kpnick
  }
}
on *:OP:%kpchan:{
  if ($opnick == $me) && (%kpnick isin %kpchan) {
    .mode %kchan -o %knick
    .ban -k %kpnick 3 [Auto][Kick]: reason(kick revenge)
    .timer 1 20 .unset %kpchan | unset %kpnick
  }
}
#Kickpro end 

i changed the on join to an on op, that way when i get opped on the channel the protection will start working, when i test it, nothing at all happens, zippo. i even took out the first part with the halt. and still nothing happens, doesnt even set the variables. ???????????? blah

Re: protection - help #117055 12/04/05 07:51 PM
Joined: Apr 2005
Posts: 22
T
TyrantX Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Apr 2005
Posts: 22
ok nevermind yet again. i figured it out. its not as good as i wanted but like 90% and i am happy with that. here is the code incase anyone wants.
Code:
#kickpro on
on *:KICK:#:{
  if ($knick == $me) {
    .set %kpchan $chan
    .set %kpnick $nick
    .set %kpaddress $address($nick,3)
    .chanserv invite $chan
    .chanserv deop %kpchan %kpnick
    .chanserv unban %kpchan 
  }
}
on *:OP:%kpchan:{
  if ($opnick == $me) {
    .mode %kpchan -o+b %kpnick %kpaddress
    .kick %kpchan %kpnick [Auto][Kick]: reason(kick revenge) 
    .unset %kpchan
    .unset %kpnick
    .unset %kpaddress
  }
}   
#kickpro end