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.

Newbie :( Stuck with Eggdrop and BGExec

General support and discussion of Eggdrop bots.
Post Reply
M
Monaro800
Voice
Posts: 3
Joined: Tue Jul 01, 2008 1:15 pm

Newbie :( Stuck with Eggdrop and BGExec

Post by Monaro800 »

Hi, im a totall newb at this eggdrop stuff. Just to demonstraight my newbie ness, heres a laugh for you pros. took me 7 hours to even install it or not in my case, before discovering the command sudo apt-get install eggdrop. Ill do my best to provide you with all the info i can.

Problem
Cant use bgexec it was working, but now it dont.

My System
2 x Intel Quad Core Xeons
4GB DRR
4 x 73GB Ultra 320 15k Drives
Ubuntu/Kubuntu 8.0*

Eggdrop File Sys
Start command

Code: Select all

 eggdrop /eggdrop/my.conf 
Eggdrop executable

Code: Select all

 /usr/bin/eggdrop 
Eggdrop modules [from apt-get instal.]

Code: Select all

 /usr/lib/eggdrop/modules
My Addons

Code: Select all

/eggdrop/addons/ADDON-NAME/File.TCL 
My Config

Code: Select all

 /eggdrops/my.conf 
]

My Egg Config file (my.conf)

Code: Select all

#! /usr/bin/eggdrop

###### Don't edit the following 11 lines ########
set mod-path "/usr/lib/eggdrop/modules/"
set help-path "/usr/share/eggdrop/help/msg/"
set text-path "/usr/lib/eggdrop/modules/"
loadmodule dns
loadmodule channels
loadmodule server
loadmodule ctcp
loadmodule irc
loadmodule notes
loadmodule console
loadmodule blowfish


# Start configuring here.

##### General Settings: ######
# Bot Nick.
set nick "Monaro800-Bot"
# Alternate Nick
set altnick "Monaro-Crashed"
# Real Name
set realname "Monaro800s-Bot-Dont-Feed"
# Bot Owner.
set owner "Monaro800"

########### set ###########
set protect-telnet 1
set stealth-telnets 1
set dcc-flood-thr 20
set hourly-updates 22
set remote-boots 0
set strict-host 0
set server-cycle-wait 10

########## Servers #############
set servers {
 wild.awesomechat.net:6667

}
# Channels
#channel add #awerockradio {
#  chanmode "+nt-likm"
#  idle-kick 0
#  stopnethack-mode 0
#}
channel add #monaro {
  chanmode "+nt-likm"
  idle-kick 0
  stopnethack-mode 0
}

#channel set #awerockradio +enforcebans +dynamicbans +userbans +dynamicexempts +greet
#channel set #awerockradio +userexempts +dynamicinvites +userinvites +protectops
#channel set #awerockradio +protectfriends +statuslog +revenge -protecthalfops +cycle
#channel set #awerockradio +revengebot +dontkickops +autovoice -autoop -autohalfop
#channel set #awerockradio -bitch -secret -shared

# Network Type (DO NOT EDIT MARC)
set net-type 0

# Eggdrop Telnet
listen 2020 all

##### Files & Directories: ############

# User / Chanel Files
set userfile "Monaro800.user"
set chanfile "Monaro800.chan"
# Temp Store
set temp-path "/eggdrop/bot-temp"
# logfile containing private msgs/ctcps, commands, errors, and misc..
logfile msbxco * "eggdrop/botlogs.logs"
# logfile of joins, parts, netsplits, kicks, bans,mode changes, and public .
logfile jpknb #awerockradio "logs/channel.log"
# Set the default console flags here.
set console "mkcobxs"

##### Uptime module:

# This module reports uptime statistics to http://uptime.eggheads.org.
# Go look and see what your uptime is! It takes about 9 hours to show up,
# so if your bot isn't listed, try again later.
# loadmodule uptime

##### SCRIPTS #####

# TCL Scripts
source /usr/share/eggdrop/scripts/alltools.tcl
source /usr/share/eggdrop/scripts/action.fix.tcl
source /eggdrop/addons/bgexec/bgexec.tcl 



# Downward Compatabilty TCK
source /usr/share/eggdrop/scripts/compat.tcl

# Other Files / HELP / User Info Etc.
source /usr/share/eggdrop/scripts/userinfo.tcl
loadhelp userinfo.help
as you can see my bgexec is located in /eggfrop/addons/gbexec/bgexec.tcl


My BGEXEC.tcl file{/b]

Code: Select all

#
# Eggdrop Background Command Execution Version 1.0
# By Fosters@G0
#
# (c) Copyright 1998 Eden Developments
#     All Rights Reserved.
#

# Path to bgexec executable
set bgexec_path "/eggdrop/addons/bgexec/bgexec"

# Interval in seconds for checking for completion
set bgcheck 3

# Dont touch these unless you want everything to die :)
set bgexecver 1
set bgexecrev 2
set watchthese ""


# Execute in background: command = command and args,
#                        proctocall = proc to call when finished,
#						 prinfo = arg to proc
#
# proc wil be called with the tmpfile and prinfo as arguments
proc execbg { command proctocall prinfo } {
	global bgexecpath bgcheck watchthese
	
	set tmpfile "/tmp/bgexec.[clock seconds]"
	
	lappend watcher $tmpfile
	lappend watcher $proctocall
	lappend watcher $prinfo
	lappend watchthese $watcher
	
	utimer $bgcheck bg_checkfiles
	
	# This is in the bgexec module
	bgexec $tmpfile $command
}

proc bg_checkfiles { } {
	global bgcheck watchthese
	
	set newwatch ""
	foreach watch $watchthese {
		if { [file exists [lindex $watch 0]] == 1 } {
			set tmpfile [lindex $watch 0]
			set proctocall [lindex $watch 1]
			set prinfo [lindex $watch 2]
			
			$proctocall $tmpfile $prinfo
			
			file delete $tmpfile
		} else {
			lappend newwatch $watch
		}
	}
	
	if { $newwatch != "" } {
		set watchthese $newwatch
		utimer $bgcheck bg_checkfiles
	}
}

putlog "BGExec Version $bgexecver.$bgexecrev loaded..."
Now when i first installed this yesterday, i followed the install guide and it worked perfectly using the command

Code: Select all

.tcl exec /shoutcast/server/./start &
BUT when i type that now i just get this.

[18:25] <[M]onaro800> .tcl exec /shoutcast/server/./start & *
[18:25] <Monaro800-Bot> What? You need '.help'

Arghhhh Can anyone help me? PLZZZZZZZZ
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Re: Newbie :( Stuck with Eggdrop and BGExec

Post by strikelight »

Monaro800 wrote: Now when i first installed this yesterday, i followed the install guide and it worked perfectly using the command

Code: Select all

.tcl exec /shoutcast/server/./start &
BUT when i type that now i just get this.

[18:25] <[M]onaro800> .tcl exec /shoutcast/server/./start & *
[18:25] <Monaro800-Bot> What? You need '.help'

Arghhhh Can anyone help me? PLZZZZZZZZ
Your '.tcl exec' command has nothing to do with the bgexec script, so you may as well unload it.

Your 'What? You need '.help'' message indicates that you have unbound (or rather, not bound it at all) the .tcl command. Looks like you did way too much pruning on your .conf file. Shouldn't have done that....
M
Monaro800
Voice
Posts: 3
Joined: Tue Jul 01, 2008 1:15 pm

Post by Monaro800 »

OK, so ive hashed out the bgexec parts in my config.

But i still dun understand why it just stopped working. i only want to use the eggdrop to execute 2 simple shell commands

!radio-up to start my shoutcast DJ software to stream to a server
and !shoutcast-up to start my own server that inturn relays to all servers i dj to.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Setting up an Eggdrop

I strongly advise not using apt.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
M
Monaro800
Voice
Posts: 3
Joined: Tue Jul 01, 2008 1:15 pm

Post by Monaro800 »

As i said i couldnt get it to compile, im still trying.

Ive used APT purly out of need, sick of ppl idleing on my servers, just thaught if i was gonna use and eggie i might as well use it for other things.

Ill keep trying to compile it, sifting through the errors one at a time, with the aid of google
Post Reply