This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Protectin error :/

Old posts that have not been replied to for several years.
Locked
W
Winters
Voice
Posts: 29
Joined: Sat Jul 09, 2005 12:24 pm

Protectin error :/

Post by Winters »

I just made a anti overtake script but at some modes it doesn't work
like this:
Test1 sets mode: +i
Bot make nothing
Test2 sets mode: +k dd
Bot make nothing
Test3 sets mode: +l 1
Bot make nothing
And here is my code :> and there are no known errors (i think)

Code: Select all

bind pub - * mode:protection

proc mode:protection {nick host hand chan mode victim} {
channel set $chan [expr [channel get $chan id] + 1]
set service "[request:service $chan]"
set id "[channel get $chan id]"
if {($mode == "-o")&&($victim == "$::botnick")} { 
 if {[onchan "$service" $chan]} {
 putquick "privmsg $service :op $chan"
}
if {($nick == "$service") && ($mode == "+i") || ($mode == "+s")} {
putserv "privmsg $service :CLEARINVITE $chan"
return 0
}
if {"$nick" == "$service"} {
return 0
}
if {"$nick" == "$::botnick"} {
return 0
}
if {![string match "*users.quakenet.org" "$host"]} {
set host [maskhost [getchanhost $nick $chan]]
} else {
set host "*!*@[lindex [split [getchanhost $nick $chan] @] 1]"
}
if {"$victim" == "$::botnick"} {
newchanban $chan $host $::botnick "You are not allowed to deop me in $chan! \((\ $id )" "30" "sticky"
putserv "kick $chan $nick :You are not allowed to deop me in $chan! \((\ $id )"
}
if {![matchattr $hand mno|mno $chan]} {
newchanban $chan $host "$::botnick" "You are not allowed to deop in $chan! \((\ $id )" "30" "sticky"
putserv "kick $chan $nick :You are not allowed to deop in $chan! \((\ $id )"
}
if {[channel get $chan rflag]} {
putserv "privmsg $service :chanlev $chan $nick -ao"
} 
} elseif {("$mode" == "+o")} {
if {"$nick" == "$::botnick"} {
return 0
} elseif {"$nick" == "$service"} {
return 0
} elseif {[string match "*.quakenet.org" $host]} {
return 0
}
if {![string match "*users.quakenet.org" "$host"]} {
set host [maskhost [getchanhost $nick $chan]]
} else {
set host "*!*@[lindex [split [getchanhost $nick $chan] @] 1]"
}
newchanban $chan $host "$::botnick" "You are not allowed to op in $chan \((\ $id )" "30" "sticky"
putserv "kick $chan $nick :You are not allowed to op in $chan! \((\ $id )"
} elseif {("$mode" == "+b")} {
if {"$nick" == "$::botnick"} {
return 0
}
if {![string match "*users.quakenet.org" "$host"]} {
set host [maskhost [getchanhost $nick $chan]]
} else {
set host "*!*@[lindex [split [getchanhost $nick $chan] @] 1]"
}
set bothost "[getchanhost $::botnick $chan]"
if {![string match "$victim" "$bothost"]} {
if {![matchattr $hand mno|mn $chan]} {
newchanban $chan $host "$::botnick" "You are not allowed to ban me in $chan! \((\ $id )" "30" "sticky"
putserv "kick $chan $nick :You are not allowed to ban me in $chan! \((\ $id )"
foreach user [chanlist $chan] {
set hosts [getchanhost $user $chan]
if {[string match "$victim" "$hosts"]} {
newchanban $chan $host "$::botnick" "You are not allowed to ban in $chan! \((\ $id )" "30" "sticky"
putserv "kick $chan $nick :You are not allowed to ban in $chan! (( $id )"
putserv "mode $chan -b $victim"
} elseif {("$mode" == "+i")} {
if {![matchattr $hand mno|mn $chan]} {
if {![string match "*users.quakenet.org" "$host"]} {
set host [maskhost [getchanhost $nick $chan]]
} else {
set host "*!*@[lindex [split [getchanhost $nick $chan] @] 1]"
}
newchanban $chan $host $::botnick "You are not allowed to set invite only on $chan! (( $id )" 30 sticky
putserv "kick $chan $nick :You are not allowed to set invite only on $chan! \((\ $id )"
pushmode $chan -i
}
} elseif {("$mode" == "+l")} {
if {![matchattr $hand mno|mn $chan]} {
if {"$victim" <= "[llength [chanlist $chan]]"} {
if {![string match "*users.quakenet.org" "$host"]} {
set host [maskhost [getchanhost $nick $chan]]
} else {
set host "*!*@[lindex [split [getchanhost $nick $chan] @] 1]"
}
newchanban $chan $host $::botnick "You are not allowed to set a small limit in $chan! (( $id )" 30 sticky
putserv "kick $chan $nick :You are not allowed to set a small limit in $chan! \((\ $id )" 30 sticky
pushmode $chan -l
           }
          }
	 }
        }
      }
     }
    }
   }
Last edited by Winters on Fri Jul 29, 2005 11:28 am, edited 1 time in total.
D
Dizzle
Op
Posts: 109
Joined: Thu Apr 28, 2005 11:21 am
Contact:

Post by Dizzle »

You will need a bind

The proc is't reacting on anything atm

Code: Select all


bind mode - * procname 

maybe this will solve the problem, at least i dont see a bind
What's this real life ppl keep talking about ??? And where can I download it ???
D
Dizzle
Op
Posts: 109
Joined: Thu Apr 28, 2005 11:21 am
Contact:

Post by Dizzle »

but why your making a protection script, there are enough protection scripts in the database, that have protection modes based on quakenet services
What's this real life ppl keep talking about ??? And where can I download it ???
Locked