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.

small problem when bot sets topic

Old posts that have not been replied to for several years.
Locked
s
simonbell
Halfop
Posts: 68
Joined: Mon Aug 05, 2002 8:07 pm
Location: Washington, England
Contact:

small problem when bot sets topic

Post by simonbell »

Ive made a script to store a default topic for the chan in a file, and well this works, but when the bot sets the topic using
putserv "TOPIC $chan :$topic"
the topic is set as:
* E changes topic to 'Welcome to #BeforeNET (E)'
When a 'user' set the topic there nick is not put in brackets at the end of the topic. Is this a standard eggdrop feature or can it be removed somehow?

thanks
Simon
t
tainted
Master
Posts: 239
Joined: Sun May 12, 2002 8:00 pm
Location: chicago
Contact:

Post by tainted »

Paste the exact code of the whole tcl please, it seems like you have something screwy going on where you set the var.
s
simonbell
Halfop
Posts: 68
Joined: Mon Aug 05, 2002 8:07 pm
Location: Washington, England
Contact:

Post by simonbell »

bind pub -|Col .topic pub_topic

proc pub_topic {nick uhost hand chan text} {
set topic [lrange $text 0 end]
set tpchan [open chantopics.db r]
set all [read $tpchan]
close $tpchan
foreach line [split $all \n] {
set readchan [lindex $line 0]
set readtopic [lrange $line 1 end]
if { $readchan == $chan } {
if { $topic == "" } {
putserv "TOPIC $chan :$readtopic"
return 0
}
if { $readtopic == $topic } {
putnotc $nick "Default topic in $chan changed to: $topic"
putserv "TOPIC $chan :$topic"
return 0
}
set readfile [open chantopics.db r]
set writefile [open chantopics.db.tmp w]
while (1) {
set checker [gets $readfile]
if {[eof $readfile]} { break }
if { [lindex $checker 0] != $chan } {
puts $writefile $checker
}
}
close $readfile
close $writefile
file rename -force chantopics.db.tmp chantopics.db
}
}
set addtopic [open chantopics.db a]
puts $addtopic "$chan $topic"
close $addtopic
putnotc $nick "Default topic in $chan changed to: $topic"
putserv "TOPIC $chan :$topic"
}
s
simonbell
Halfop
Posts: 68
Joined: Mon Aug 05, 2002 8:07 pm
Location: Washington, England
Contact:

Post by simonbell »

It *appears* that this is actually due to the ircd running and not the eggdrop. I have a network running as a standard bot on an ircu network and it doesnt add its nick afterwards, however the bot in question is running on a ulined server running unrealircd and it seems even when i just type .topic blah in the partyline the nick is added afterwards.

Simon
Locked