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.

Is this possible?

Old posts that have not been replied to for several years.
Locked
T
TLM
Voice
Posts: 11
Joined: Thu Apr 10, 2003 7:35 pm
Location: Asheville, NC, USA
Contact:

Is this possible?

Post by TLM »

Two things, one dynamic binding from IRC cmds like
&add <alias> <public cmd that alias represents>


and the other is, is it possible to call functions in other loaded scripts on the bot from some script.
e.g.
script1.tcl had funca
and script2.tcl calls that funca thus cutting down on copyed code.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

1. Yes. See the 'bind' command.

2. Yes. This is a normal part of Tcl.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

1: Yes, you should look at the bind command. However, are you talking about a script that will create an alias, to a allready existing script/trigger?

2: Yes. The source command, works simalar to the php include(), C #include.

The script is loaded into the global namespace. Thus, because both script 1 and 2 are in global space (IE, the same space), they can access each other.

Very quick examples of this is, the compat.tcl and alltools.tcl in the scripts Dir, a lot of scripts still use these.
T
TLM
Voice
Posts: 11
Joined: Thu Apr 10, 2003 7:35 pm
Location: Asheville, NC, USA
Contact:

Post by TLM »

ppslim wrote:1: Yes, you should look at the bind command. However, are you talking about a script that will create an alias, to a allready existing script/trigger?
Yes thats exactly what im looking for. A script to create a alias to a all ready existing trigger, with option cmd extras.

As for the 2nd question, good, cause im more fimilar with PHP.

To help clear up the first question a bit more now that I re read the question I posed. Here is what I have, I dloaded the qstat script, so I could do !hl <serverip:port>, what I want to do is be able to bind a cmd on the fly from a irc channel so I could do one command (like !xyz) instead of doing !hl <serverip:port>
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

With the bind command, it would be possible to create these aliases.

However, this would need to be placed in a seperate file, and loaded in using source (along the lines of a Tcl script), or placed directly in the config file.

A command on DCC, or IRC, would take more work however. Creating aliases to DCC based commands is simple, but IRC triggers is a little harder.
Locked