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.

BIG Problem

Old posts that have not been replied to for several years.
Locked
User avatar
Rusher2K
Halfop
Posts: 88
Joined: Fri Apr 18, 2003 10:45 am
Location: Germany
Contact:

BIG Problem

Post by Rusher2K »

I had an request script today some body with the nick : [die][die] requested a bot for #[die][die] and teh bot shut down.
How can i fixx this ?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

The script contains code that is treating string as lists, wihtout first converting them.

What script have you got loaded.
User avatar
Rusher2K
Halfop
Posts: 88
Joined: Fri Apr 18, 2003 10:45 am
Location: Germany
Contact:

Post by Rusher2K »

THIS :

Code: Select all

proc pub_request {nick host hand chan arg} {
putlog "ADD 1"
        global botnick

 #if {$chan == "#sicherheit"} {return 0}


        set requests ""

  if {![file exists "requests.txt"]} {return 0}

  set infile [open "requests.txt" r]

  while {![eof $infile]} {

    gets $infile dataline

    if {$dataline != ""} {lappend requests $dataline}

  }

  close $infile

    set blockedchans ""

  if {![file exists "blockedchans.txt"]} { return 0 }

  set infile [open "blockedchans.txt" r]

  while {![eof $infile]} {

    gets $infile dataline

    if {$dataline != ""} {lappend blockedchans $dataline}

  }

  close $infile

        set blocked 0

        set joinchan [lindex [split $arg] 0]


     if {$joinchan == "#sicherheit"} {

        puthelp "NOTICE $nick :Yo must not request for #sicherheit!!!"


        newignore *!$host $botnick "Yo must not request for #sicherheit!!!" 1

        return 0
        }


        foreach channel $blockedchans {

        if {$channel == $joinchan} { set blocked 1 }

        }

        foreach channel $requests {

        set channel [string tolower [lindex $channel 0]]

        if {$channel == $joinchan} { set blocked 1 }

        }

        if {$blocked == 0} {

        if {$chan == "#sicherheit"} {
putlog "ADD 2"
        putlog "$nick requested a bot for $joinchan"

        channel add $joinchan
channel set $joinchan -inactive

        utimer 10 "checkchan $joinchan $nick $host"

        #utimer 10 "set total \[llength \[chanlist $joinchan]]; if {\$total < 70 || !\[isop $nick $joinchan]} { puthelp \"NOTICE $nick :Either you haven't 70 user in your channel or you haven't op.\" } else { puthelp \"NOTICE $nick :Your request has been sent to John\"; puthelp \"PRIVMSG #sicherheit.intern :$nick!$host requested for $joinchan - \$total User\" }"

        utimer 20 [list channel remove $joinchan]
putlog "ADD 3"
        }

        } else {

        puthelp "NOTICE $nick :You're channel is blocked or the requests already stored! You must wait 5 minutes to try again!"

        newignore *!$host $botnick "requested bots for a blocked channel" 5

        putlog "$nick requested a bot for $joinchan altough this channel is blocked"

        }

}
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

change

Code: Select all

utimer 10 "checkchan $joinchan $nick $host"
to

Code: Select all

utimer 10 [list checkchan $joinchan $nick $host]
User avatar
Rusher2K
Halfop
Posts: 88
Joined: Fri Apr 18, 2003 10:45 am
Location: Germany
Contact:

Post by Rusher2K »

with this changes it also executes the comand "die"
Locked