<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/10826" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2005-11-14T16:10:59-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/10826</id>

		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2005-11-14T16:10:59-04:00</updated>

		<published>2005-11-14T16:10:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=57407#p57407</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=57407#p57407"/>
		<title type="html"><![CDATA[protection error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=57407#p57407"><![CDATA[
Ok, i have an error with the kickmsg, the kickmsg does not format correctly<br><br>The code:<div class="codebox"><p>Code: </p><pre><code>proc protect::protection {nickname hostname handle channel mode victim} {   if {($nickname == "$victim") || ($nickname == "$::botnick") || ![channel get $channel "protection"]} {      return 0   }   switch -exact -- $mode {      "+o" {         if {![matchattr $handle nmAS|nmo $channel]} {            putquick "PRIVMSG [protect::service $channel] :DEOPALL $channel" -next            if {[string match -nocase $::botnick $victim]} {               set reason "op me"            } else {               set reason "op anyone"            }            set kickid [expr $::id + 1]            set kickmsg $protect::kickmsg            set kickmsg "[format $kickmsg $reason $channel $kickid $protect::homechan]"            if {[string match -nocase "*users.quakenet.org" $hostname]} {               set homename *!*@[lindex [split $hostname] 1]            }            newchanban $channel $hostname "$kickmsg" $protect::prot_btime            if {[botisop $channel]} {               if {[string match -nocase $::botnick $victim]} {                  putquick "MODE $channel -o+b $nickname $hostname" -next               } else {                  putquick "MODE $channel -oo+b $nickname $victim $hostname" -next               }               putquick "KICK $channel $nickname $kickmsg"               putlog "punished $nickname on $channel \(Reason: op\)"            } else {               putlog "Error: could not punished $nickname on $channel \(Reason: no op\)"            }         }      }      "-o" {         if {![matchattr $handle nmAS|nmo $channel]} {            putquick "PRIVMSG [protect::service $channel] :DEOPALL $channel" -next            if {[string match -nocase $::botnick $victim]} {               putquick "PRIVMSG [protect::service $channel] :OP $channel" -next               set reason "deop me"            } else {               set reason "deop anyone"            }            set kickid [expr {$::id} + 1]            set kickmsg $protect::kickmsg            set kickmsg "[format $kickmsg $reason $channel $kickid $protect::homechan]"            if {[string match -nocase "*users.quakenet.org" $hostname]} {               set homename *!*@[lindex [split $hostname] 1]            }            newchanban $channel $hostname "$kickmsg" $protect::prot_btime            if {[botisop $channel]} {               if {[string match -nocase $::botnick $victim]} {                  putquick "MODE $channel -o+b $nickname $hostname" -next               } else {                  putquick "MODE $channel -o+ob $nickname $victim $hostname" -next               }               putquick "KICK $channel $nickname :$kickmsg"               putlog "punished $nickname on $channel \(Reason: op\)"            } else {               putlog "Error: could not punished $nickname on $channel \(Reason: no op\)"            }         }      }      "+v" {         if {![matchattr $handle nmAS|nmo $channel]} {            if {[botisop $channel]} {               putquick "MODE $channel -ov $nickname $victim"            } else {               putlog "Error: could not punished $nickname on $channel \(Reason: no op\)"            }         }         putlog "punished $nickname on $channel \(Reason: voice\)"      }      "-v" {         if {![matchattr $handle nmAS|nmo $channel]} {            if {[botisop $channel]} {               putquick "MODE $channel -o+v $nickname $victim"            } else {               putlog "Error: could not punished $nickname on $channel \(Reason: no op\)"            }         }         putlog "punished $nickname on $channel \(Reason: devoice\)"      }      "+b" {         if {![matchattr $handle nmAS|nmo $channel]} {            if {[string match -nocase "*users.quakenet.org" $hostname]} {               set hostname "*!*@[lindex [split $hostname] 1]"            }            if {[string match -nocase $::botname $victim]} {               if {![botisop $channel]} {                  putquick "PRIVMSG [protect::service $channel] :OP $channel" -next               }               set reason "ban me"            } else {               set reason "ban anyone"            }            set kickid [expr $::id + 1]            set kickmsg $protect::kickmsg            set kickmsg "[format $kickmsg $reason $channel $kickid $protect::homechan]"            newchanban $channel $hostname "$kickmsg" $protect::prot_btime            if {[botisop $channel]} {               putquick "MODE $channel -ob+b $nickname $victim $hostname" -next               putquick "KICK $channel $nickname $kickmsg"               putlog "punished $nickname on $channel \(Reason: ban\)"            } else {               putlog "Error: could not punished $nickname on $channel \(Reason: no op\)"            }         }      }      "-b" {         if {![matchattr $handle nmAS|nmo $channel]} {            if {[string match -nocase "*users.quakenet.org" $hostname]} {               set hostname "*!*@[lindex [split $hostname] 1]"            }            if {![botisop $channel]} {               putquick "PRIVMSG [protect::service $channel] :OP $channel" -next            }            set reason "unban anyone"            set kickid [expr $::id + 1]            set kickmsg $protect::kickmsg            set kickmsg "[format $kickmsg $reason $channel $kickid $protect::homechan]"            newchanban $channel $hostname "$kickmsg" $protect::prot_btime            if {[botisop $channel]} {               putquick "MODE $channel -o+bb $nickname $hostname $victim" -next               putquick "KICK $channel $nickname $kickmsg"               putlog "punished $nickname on $channel \(Reason: unban\)"            } else {               putlog "Error: could not punished $nickname on $channel \(Reason: no op\)"            }         }      }      "+i" {         if {![matchattr $handle nmAS|nmo $channel]} {            if {![botisop $channel]} {               putquick "PRIVMSG [protect::service $channel] :OP $channel"            }            if {[string match -nocase "*users.quakenet.org" $hostname]} {               set hostname "*!*@[lindex [split $hostname] 1]"            }            set kickmsg $protect::kickmsg            set reason "set invite"            set kickid [expr $::id + 1]            set kickmsg "[format $kickmsg $reason $channel $kickid $protect::homechan]"            newchanban $channel $hostname "$kickmsg" $protect::prot_btime            if {[botisop $channel]} {               putquick "MODE $channel -oi+b $nickname $hostname" -next               putquick "KICK $channel $nickname $kickmsg"               putlog "punished $nickname on $channel \(Reason: set invite\)"            } else {               putlog "Error: could not punished $nickname on $channel \(Reason: no op\)"            }         }      }      "-i" {         if {![matchattr $handle nmAS|nmo $channel]} {            if {![botisop $channel]} {               putquick "PRIVMSG [protect::service $channel] :OP $channel"            }            if {[string match -nocase "*users.quakenet.org" $hostname]} {               set hostname "*!*@[lindex [split $hostname] 1]"            }            set reason "unset invite"            set kickid [expr $::id + 1]            set kickmsg $protect::kickmsg            set kickmsg "[format $kickmsg $reason $channel $kickid $protect::homechan]"            newchanban $channel $hostname "$kickmsg" $protect::prot_btime            if {[botisop $channel]} {               putquick "MODE $channel -o+ib $nickname $hostname" -next               putquick "KICK $channel $nickname $kickmsg"               putlog "punished $nickname on $channel \(Reason: unset invite\)"            } else {               putlog "Error: could not punished $nickname on $channel \(Reason: no op\)"            }         }      }      "+l" {         if {![matchattr $handle nmAS|nmo $channel]} {            if {![botisop $channel]} {               putquick "PRIVMSG [protect::service $channel] :OP $channel"            }            if {[string match -nocase "*users.quakenet.org" $hostname]} {               set hostname "*!*@[lindex [split $hostname] 1]"            }            set reason "set +l \(limit\)"            set kickid [expr $::id + 1]            set kickmsg $protect::kickmsg            set kickmsg "[format $kickmsg $reason $channel $kickid $protect::homechan]"            newchanban $channel $hostname "$kickmsg" $protect::prot_btime            if {[botisop $channel]} {               putquick "MODE $channel -ol+b $nickname $hostname" -next               putquick "KICK $channel $nickname $kickmsg"               putlog "punished $nickname on $channel \(Reason: set limit\)"            } else {               putlog "Error: could not punished $nickname on $channel \(Reason: no op\)"            }         }      }      "-l" {         if {![matchattr $handle nmAS|nmo $channel]} {            if {![botisop $channel]} {               putquick "PRIVMSG [protect::service $channel] :OP $channel"            }            if {[string match -nocase "*users.quakenet.org" $hostname]} {               set hostname "*!*@[lindex [split $hostname] 1]"            }            set reason "unset +l \(limit\)"            set kickid [expr $::id + 1]            set kickmsg $protect::kickmsg            set kickmsg "[format $kickmsg $reason $channel $kickid $protect::homechan]"            newchanban $channel $hostname "$kickmsg" $protect::prot_btime            if {[botisop $channel]} {               putquick "MODE $channel -o+bl $nickname $hostname $victim" -next               putquick "KICK $channel $nickname $kickmsg"               putlog "punished $nickname on $channel \(Reason: unset limit\)"            } else {               putlog "Error: could not punished $nickname on $channel \(Reason: no op\)"            }         }      }      "+m" {         if {![matchattr $handle nmAS|nmo $channel]} {            if {![botisop $channel]} {               putquick "PRIVMSG [protect::service $channel] :OP $channel"            }            if {[string match -nocase "*users.quakenet.org" $hostname]} {               set hostname "*!*@[lindex [split $hostname] 1]"            }            set reason "set +m \(moderated\)"            set kickid [expr $::id + 1]            set kickmsg $protect::kickmsg            set kickmsg "[format $kickmsg $reason $channel $kickid $protect::homechan]"            newchanban $channel $hostname "$kickmsg" $protect::prot_btime            if {[botisop $channel]} {               putquick "MODE $channel -om+b $nickname $hostname" -next               putquick "KICK $channel $nickname $kickmsg"               putlog "punished $nickname on $channel \(Reason: set moderated\)"            } else {               putlog "Error: could not punished $nickname on $channel \(Reason: no op\)"            }         }      }      "-m" {         if {![matchattr $handle nmAS|nmo $channel]} {            if {![botisop $channel]} {               putquick "PRIVMSG [protect::service $channel] :OP $channel"            }            if {[string match -nocase "*users.quakenet.org" $hostname]} {               set hostname "*!*@[lindex [split $hostname] 1]"            }            set reason "unset +m \(moderated\)"            set kickid [expr $::id + 1]            set kickmsg $protect::kickmsg            set kickmsg "[format $kickmsg $reason $channel $kickid $protect::homechan]"            newchanban $channel $hostname "$kickmsg" $protect::prot_btime            if {[botisop $channel]} {               putquick "MODE $channel -o+mb $nickname $hostname" -next               putquick "KICK $channel $nickname $kickmsg"               putlog "punished $nickname on $channel \(Reason: unset moderated\)"            } else {               putlog "Error: could not punished $nickname on $channel \(Reason: no op\)"            }         }      }      "+k" {         if {![matchattr $handle nmAS|nmo $channel]} {            if {![botisop $channel]} {               putquick "PRIVMSG [protect::service $channel] :OP $channel"            }            if {[string match -nocase "*users.quakenet.org" $hostname]} {               set hostname "*!*@[lindex [split $hostname] 1]"            }            set reason "set +k \(key\)"            set kickid [expr $::id + 1]            set kickmsg $protect::kickmsg            set kickmsg "[format $kickmsg $reason $channel $kickid $protect::homechan]"            newchanban $channel $hostname "$kickmsg" $protect::prot_btime            if {[botisop $channel]} {               putquick "MODE $channel -ok+b $nickname $hostname" -next               putquick "KICK $channel $nickname $kickmsg"               putlog "punished $nickname on $channel \(Reason: set key\)"            } else {               putlog "Error: could not punished $nickname on $channel \(Reason: no op\)"            }         }      }      "-k" {         if {![matchattr $handle nmAS|nmo $channel]} {            if {![botisop $channel]} {               putquick "PRIVMSG [protect::service $channel] :OP $channel"            }            if {[string match -nocase "*users.quakenet.org" $hostname]} {               set hostname "*!*@[lindex [split $hostname] 1]"            }            set reason "unset +m \(moderated\)"            set kickid [expr $::id + 1]            set kickmsg $protect::kickmsg            set kickmsg "[format $kickmsg $reason $channel $kickid $protect::homechan]"            newchanban $channel $hostname "$kickmsg" $protect::prot_btime            if {[botisop $channel]} {               putquick "MODE $channel -o+bk $nickname $hostname $victim" -next               putquick "KICK $channel $nickname $kickmsg"               putlog "punished $nickname on $channel \(Reason: unset key\)"            } else {               putlog "Error: could not punished $nickname on $channel \(Reason: no op\)"            }         }      }      "+t" {         if {![matchattr $handle nmAS|nmo $channel]} {            if {![botisop $channel]} {               putquick "PRIVMSG [protect::service $channel] :OP $channel"            }            if {[string match -nocase "*users.quakenet.org" $hostname]} {               set hostname "*!*@[lindex [split $hostname] 1]"            }            set reason "set +t \(topic\)"            set kickid [expr $::id + 1]            set kickmsg $protect::kickmsg            set kickmsg "[format $kickmsg $reason $channel $kickid $protect::homechan]"            newchanban $channel $hostname "$kickmsg" $protect::prot_btime            if {[botisop $channel]} {               putquick "MODE $channel -ot+b $nickname $hostname" -next               putquick "KICK $channel $nickname $kickmsg"               putlog "punished $nickname on $channel \(Reason: set topic +t\)"            } else {               putlog "Error: could not punished $nickname on $channel \(Reason: no op\)"            }         }      }      "-t" {         if {![matchattr $handle nmAS|nmo $channel]} {            if {![botisop $channel]} {               putquick "PRIVMSG [protect::service $channel] :OP $channel"            }            if {[string match -nocase "*users.quakenet.org" $hostname]} {               set hostname "*!*@[lindex [split $hostname] 1]"            }            set reason "unset +t \(topic\)"            set kickid [expr $::id + 1]            set kickmsg $protect::kickmsg            set kickmsg "[format $kickmsg $reason $channel $kickid $protect::homechan]"            newchanban $channel $hostname "$kickmsg" $protect::prot_btime            if {[botisop $channel]} {               putquick "MODE $channel -o+bt $nickname $hostname " -next               putquick "KICK $channel $nickname $kickmsg"               putlog "punished $nickname on $channel \(Reason: unset topic +t\)"            } else {               putlog "Error: could not punished $nickname on $channel \(Reason: no op\)"            }         }      }      "+n" {         if {![matchattr $handle nmAS|nmo $channel]} {            if {![botisop $channel]} {               putquick "PRIVMSG [protect::service $channel] :OP $channel"            }            if {[string match -nocase "*users.quakenet.org" $hostname]} {               set hostname "*!*@[lindex [split $hostname] 1]"            }            set reason "set +n \(no external messages\)"            set kickid [expr $::id + 1]            set kickmsg $protect::kickmsg            set kickmsg "[format $kickmsg $reason $channel $kickid $protect::homechan]"            newchanban $channel $hostname "$kickmsg" $protect::prot_btime            if {[botisop $channel]} {               putquick "MODE $channel -on+b $nickname $hostname" -next               putquick "KICK $channel $nickname $kickmsg"               putlog "punished $nickname on $channel \(Reason: set key\)"            } else {               putlog "Error: could not punished $nickname on $channel \(Reason: no op\)"            }         }      }      "-n" {         if {![matchattr $handle nmAS|nmo $channel]} {            if {![botisop $channel]} {               putquick "PRIVMSG [protect::service $channel] :OP $channel"            }            if {[string match -nocase "*users.quakenet.org" $hostname]} {               set hostname "*!*@[lindex [split $hostname] 1]"            }            set reason "unset +n \(no external messages\)"            set kickid [expr $::id + 1]            set kickmsg $protect::kickmsg            set kickmsg "[format $kickmsg $reason $channel $kickid $protect::homechan]"            newchanban $channel $hostname "$kickmsg" $protect::prot_btime            if {[botisop $channel]} {               putquick "MODE $channel -o+nb $nickname $hostname" -next               putquick "KICK $channel $nickname $kickmsg"               putlog "punished $nickname on $channel \(Reason: unset key\)"            } else {               putlog "Error: could not punished $nickname on $channel \(Reason: no op\)"            }         }      }      "+s" {         if {![matchattr $handle nmAS|nmo $channel]} {            if {![botisop $channel]} {               putquick "PRIVMSG [protect::service $channel] :OP $channel"            }            if {[string match -nocase "*users.quakenet.org" $hostname]} {               set hostname "*!*@[lindex [split $hostname] 1]"            }            set reason "set +s \(secret\)"            set kickid [expr $::id + 1]            set kickmsg $protect::kickmsg            set kickmsg "[format $kickmsg $reason $channel $kickid $protect::homechan]"            newchanban $channel $hostname "$kickmsg" $protect::prot_btime            if {[botisop $channel]} {               putquick "MODE $channel -os+b $nickname $hostname" -next               putquick "KICK $channel $nickname $kickmsg"               putlog "punished $nickname on $channel \(Reason: set secret\)"            } else {               putlog "Error: could not punished $nickname on $channel \(Reason: no op\)"            }         }      }      "-s" {         if {![matchattr $handle nmAS|nmo $channel]} {            if {![botisop $channel]} {               putquick "PRIVMSG [protect::service $channel] :OP $channel"            }            if {[string match -nocase "*users.quakenet.org" $hostname]} {               set hostname "*!*@[lindex [split $hostname] 1]"            }            set reason "unset +s \(secret\)"            set kickid [expr $::id + 1]            set kickmsg $protect::kickmsg            set kickmsg "[format $kickmsg $reason $channel $kickid $protect::homechan]"            newchanban $channel $hostname "$kickmsg" $protect::prot_btime            if {[botisop $channel]} {               putquick "MODE $channel -o+sb $nickname $hostname" -next               putquick "KICK $channel $nickname $kickmsg"               putlog "punished $nickname on $channel \(Reason: unset secret\)"            } else {               putlog "Error: could not punished $nickname on $channel \(Reason: no op\)"            }         }      }      "+p" {         if {![matchattr $handle nmAS|nmo $channel]} {            if {![botisop $channel]} {               putquick "PRIVMSG [protect::service $channel] :OP $channel"            }            if {[string match -nocase "*users.quakenet.org" $hostname]} {               set hostname "*!*@[lindex [split $hostname] 1]"            }            set reason "set +p \(private\)"            set kickid [expr $::id + 1]            set kickmsg $protect::kickmsg            set kickmsg "[format $kickmsg $reason $channel $kickid $protect::homechan]"            newchanban $channel $hostname "$kickmsg" $protect::prot_btime            if {[botisop $channel]} {               putquick "MODE $channel -op+b $nickname $hostname" -next               putquick "KICK $channel $nickname $kickmsg"               putlog "punished $nickname on $channel \(Reason: set private\)"            } else {               putlog "Error: could not punished $nickname on $channel \(Reason: no op\)"            }         }      }      "-p" {         if {![matchattr $handle nmAS|nmo $channel]} {            if {![botisop $channel]} {               putquick "PRIVMSG [protect::service $channel] :OP $channel"            }            if {[string match -nocase "*users.quakenet.org" $hostname]} {               set hostname "*!*@[lindex [split $hostname] 1]"            }            set reason "unset +p \(private\)"            set kickid [expr $::id + 1]            set kickmsg $protect::kickmsg            set kickmsg "[format $kickmsg $reason $channel $kickid $protect::homechan]"            newchanban $channel $hostname "$kickmsg" $protect::prot_btime            if {[botisop $channel]} {               putquick "MODE $channel -o+pb $nickname $hostname" -next               putquick "KICK $channel $nickname $kickmsg"               putlog "punished $nickname on $channel \(Reason: unset private\)"            } else {               putlog "Error: could not punished $nickname on $channel \(Reason: no op\)"            }         }      }   }}</code></pre></div>The error:<div class="codebox"><p>Code: </p><pre><code>* Bk`Tosser-- sets mode: +i* aP|Trojan sets mode: -io+b Bk`Tosser-- *!Tosser@spc1-lanc1-3-0-cust169.asfd.broadband.ntl.com* Bk`Tosser-- was kicked by aP|Trojan (6) ][ (SecureBot by #BotCentrum) ])Kickmsg should be:* Bk`Tosser-- was kicked by aP|Trojan ([ (You are not ALLOWED to set invite on #channel) ][ (ID: 6) ][ (SecureBot by #BotCentrum) ])</code></pre></div>I can't seem to find an error with the format...<br><br>Thanks in advance !!<br>Chris <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Mon Nov 14, 2005 4:10 pm</p><hr />
]]></content>
	</entry>
	</feed>
