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.

AVOnJoin problem

Old posts that have not been replied to for several years.
m
maple1

AVOnJoin problem

Post by maple1 »

Hello,
I have a problem with "AVOnJoin 1.02 by Baerchen", when I load this tcl and than rehash the bot goes down (die) and can't come online anymore till I unload it again :(
download-link of the tcl is http://www.egghelp.org/tclhtml/3478-4-0 ... OnJoin.htm
this is the complete script...

#
# ___ _____ _ _
# / \ \ / / _ \ _ __ | | ___ (_)_ __
# / _ \ \ / / | | | '_ \ _ | |/ _ \| | '_ \
# / ___ \ V /| |_| | | | | |_| | (_) | | | | |
# /_/ \_\_/ \___/|_| |_|\___/ \___/|_|_| |_|1.02
#
#
# by Baerchen (baerchen@germany-chat.net), March 2001 for eggdrop 1.4.x+
#
# Script listens to a botmaster's/channelmaster's command <.av on|off>
# in the channel and enables or disables autovoicing of joining users.
# AVOnJoin will not voice when channel is +m(oderated). Settings
# are being kept in a config-file, so no worrying about re-enabling
# each channel after Bot restart. AVOnJoin handles all channels
# independently.
#
# History
#
# 1.02: Fixed a nasty bug causing the bot to crash when script was loaded was time (Sorry ..)
#
#
# Set path and filename for configuration file:
#
set av_cfg "workdir/av_cfg.cfg"
#
##### CODEBASE BELOW

bind pub m|m .av av_init

proc av_init {nick uhost handle channel arg} {
global av_a
set c [string tolower $channel]; set av_switch [string tolower [lindex $arg 0]]
if {$av_switch != "on" && $av_switch != "off"} {puthelp "NOTICE $nick :Usage: .avjoin on|off"; return}
switch -exact $av_switch {
"on" {
if {[lsearch -exact [bind join - "$c *"] av_do] > -1} {puthelp "notice $nick :AutoVoicing is already enabled"; return}
set av_a($c) "on"; bind join - "$c *" av_do
if {![botisop $c]} {puthelp "NOTICE $nick :Got you, but I need OP to do that. I will start autovoicing right after I got OPs."; return}
puthelp "NOTICE $nick :AutoVoicing enabled for $c."; putlog "AutoVoicing enabled for $c. ($nick)"
}
"off" {
if {[lsearch -exact [bind join - "$c *"] av_do] == -1} {puthelp "notice $nick :AutoVoicing is already disabled"; return}
set av_a($c) "off"; unbind join - "$c *" av_do
puthelp "NOTICE $nick :AutoVoicing disabled for $c."; putlog "AutoVoicing disabled for $c. ($nick)"
}
}
av_save
}

proc av_save {} {
global av_a av_cfg
set fid [open $av_cfg w]; foreach a [array names av_a] {puts $fid "$a $av_a($a)"}; close $fid
}

proc av_read {} {
global av_a av_cfg
if {![file exists $av_cfg]} {putlog "AVOnJoin settings not found. Creating empty file."; set fid [open $av_cfg w]; close $fid; return}
set fid [open $av_cfg r]; while {![eof $fid]} {gets $fid line; if {[llength $line] == 2} {set av_a([lindex $line 0]) [lindex $line 1]}}
close $fid; foreach a [array names av_a] {if {$av_a($a) == "on"} {bind join - "$a *" av_do}}
}

proc av_do {nick uhost handle c} {
global av_a botnick
if {(![botisop $c]) || ([lsearch -regexp [getchanmode $c] "m"] > -1)} {return}; set c [string tolower $c]
if {([info exists av_a($c)]) && ($av_a($c) == "on") && ($nick != $botnick)} {pushmode $c +v $nick}
}

av_read
putlog "TCL LOADED: AVOnJoin 1.02 by Baerchen"
m
mortician
Voice
Posts: 37
Joined: Sun Sep 22, 2002 6:35 pm
Location: Tsjakamaka
Contact:

Post by mortician »

what error do you get in the partyline or when you trie to start your egg again?
It is a mistake to think you can solve any major problems just with potatoes.
m
maple1

Post by maple1 »

Thx for the reply mortician, now i have seen via the dos-box that i did't make the dir "workdir" :-?
this was the error:
[19:34] Tcl error in file 'eggdrop.conf':
[19:34] couldn't open "workdir/av_cfg.cfg": no such file or directory
while executing
"open $av_cfg w"
(procedure "av_read" line 3)
invoked from within
"av_read"
(file "scripts/avonjoin.tcl" line 69)
invoked from within
"source scripts/avonjoin.tcl"
(file "eggdrop.conf" line 1333)
[19:34] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)

After making that dir en starting again with the -m flag the bot goes online and works great with the AVOnJoin.tcl :)
The only thing i got was this:
[19:36] AVOnJoin settings not found. Creating empty file.
[19:36] TCL LOADED: AVOnJoin 1.02 by Baerchen
but after i set a chan autovoice with ".av on" (in the chan) the "empty file" was not empty anymore :)
./me very happy now :D
h
hwjchim
Voice
Posts: 14
Joined: Wed Mar 10, 2004 2:51 pm

Post by hwjchim »

19:36] AVOnJoin settings not found. Creating empty file.
[19:36] TCL LOADED: AVOnJoin 1.02 by Baerchen
but after i set a chan autovoice with ".av on" (in the chan) the "empty file" was not empty anymore
./me very happy now

Maple1,
How did you fix this?
My file is still empty.
I did exactly like it said:
I typed: .av on
in the channel and nothing happens

Help?
m
maple1

Post by maple1 »

Hello hwjchim,

go to your bots-dir and make a new folder and name it: workdir
start your bot again with the -m flag

Thats it :)


goodluck,
Maple
h
hwjchim
Voice
Posts: 14
Joined: Wed Mar 10, 2004 2:51 pm

Post by hwjchim »

Maple,

Yes, I did what you said. I made a workdir,
made the room -m, restarted bot.
I then typed .av on in the main channel,
and still nothing.
:(

TCL LOADED: AVOnJoin 1.02 by Baerchen
[13:33] Userfile loaded, unpacking...

now it's loaded, but when i type .av on
nothing happens
m
maple1

Post by maple1 »

What error do you see now in the p-line when you try setting a chan +v?
h
hwjchim
Voice
Posts: 14
Joined: Wed Mar 10, 2004 2:51 pm

Post by hwjchim »

I see no errors. Nothing happens.
I type .av on
and sit there to see if something happens, butnothing.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

When you are in the channel, and on the partyline you type .channel, does the bot see you as the right user? Do you have +m?

When you type ".av dragon" does the bot send you a notice that says "Usage: .avjoin on|off" ??
h
hwjchim
Voice
Posts: 14
Joined: Wed Mar 10, 2004 2:51 pm

Post by hwjchim »

ok i did the .channel
I do not see a +m
I am the owner/master of the bot though.
It is my bot. Hm, I do however, see a N

(n = owner, m = master, o = op, d = deop, b = bot)

Hm, any advice?
Thanks.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

What about the other test?
h
hwjchim
Voice
Posts: 14
Joined: Wed Mar 10, 2004 2:51 pm

Post by hwjchim »

The only test I did was the .channel on the partyline.
Again, all i see is "N"
for owner. I do not see a m for master
As for the ".av dragon"
I see nothing.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Simple then, the bot doesn't see you, or you don't have +m. Make sure your host is correct, and that you see your handle on .channel output. Make sure the user you're identified as has +m. You'll know it's working when ".av blahblah" makes the bot send you the notice I indicated above.
h
hwjchim
Voice
Posts: 14
Joined: Wed Mar 10, 2004 2:51 pm

Post by hwjchim »

I'm new at this bot thing.
I don't see +m or m when I type .channel
I only see N.

To my knowledge, n (N) = owner.
m = master.

Why would I need m if I am N ?
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Could you be a little more vague? When you do .channel, I really hope you don't just see "N". And no, N is not the same as n, and it's not a +m either.

Hopefully you see something like this:

Code: Select all

<stdarg> .channel
<martian> [19:36] #stdarg# (#trivia) channel
<martian> Channel #trivia, 34 members, mode +tn:
<martian> Channel Topic: <sandiifem> i feel naked
<martian> (n = owner, m = master, o = op, d = deop, b = bot)
<martian>  NICKNAME      HANDLE       JOIN  IDLE  USER@HOST
<martian> @martian       *           13Mar       <- it's me!
<martian> +Qasabah       *            ---    18h  Qasabah@h24-65-57-62.fm.shawcable.net
<martian> @yarker        *            ---     2h  stdarg@crackaddict.com
<martian> +galiant       galiant     14Mar G  4h  ~Steve@ool-43508793.dyn.optonline.net
<martian> @callipy[away] callipygian 14Mar O 17h  ~bertuccio@209-102-132-116.dialup.gulftelephone.net
<martian> +z             *           14Mar    6h  jonas@neural.psychosis.net
<martian> +Phishy        phishfan    15Mar G      flodd@oh.no.not-that.com
(truncated)
So... where are you seeing N? Is it under NICKNAME? HANDLE? USER@HOST? Who knows.

If it's under HANDLE, then the bot sees you as the user N. Type .whois N to see what flags that person has. If you have a * next to your nick, then the bot doesn't recognize you.
Locked