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.

Error

Old posts that have not been replied to for several years.
Locked
N
Nexus6
Op
Posts: 114
Joined: Mon Sep 02, 2002 4:41 am
Location: Tuchola, Poland

Error

Post by Nexus6 »

This script should send a msg to Operserv when gets spam strings via priv and should increase number of spammers caught in a file.
it doesn't work. It send a msg and everything is ok but it but couting is messed up
(TestBot) [04:18] TCL error [glinem]: channel "file11" wasn't opened for writing
# Privmsg BINDS
bind msgm - "*www.*" glinem
bind msgm - "*http//*" glinem
bind msgm - "*/server*" glinem

# Gline time in format Xd -days Xh -hours Xm -mins, Xs - seconds
set gtime "5d"

#PrivMsg gline proc
proc glinem {nick uhost handle text} {
global botnick gtime
if {[matchattr $nick f]} {return 0}
if {([isbotnick $nick]) || ([string tolower $nick] == "ChanServ")} {return 0}
set smm "*@[lindex [split $uhost @] 1]"
putquick "PRIVMSG Operserv :gline $gtime $smm Auto Gline - spamming"
set o_fid [open "spammers.dat" "RDONLY"]
gets $o_fid spammerz
puts $o_fid "[expr $spammerz + 1]"
close $o_fid
return 1
}

# Stats Area
bind pub m !spammers spammers
proc spammers {nick host hand chan arg} {
global spammerz
set o_fid [open "spammers.dat" "RDONLY"]
gets $o_fid spammerz
close $o_fid
putserv "PRIVMSG $chan :$spammerz have been caught since bla"
}
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

The file has been opened read only.

You need to close the fle after reading it, then re-open it in write mode.
Locked