<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/17537" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2010-01-25T23:39:30-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/17537</id>

		<entry>
		<author><name><![CDATA[rrc55]]></name></author>
		<updated>2010-01-25T23:39:30-04:00</updated>

		<published>2010-01-25T23:39:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91852#p91852</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91852#p91852"/>
		<title type="html"><![CDATA[Mod Function Arguments]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91852#p91852"><![CDATA[
Got it thanks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10533">rrc55</a> — Mon Jan 25, 2010 11:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-01-24T10:40:01-04:00</updated>

		<published>2010-01-24T10:40:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91808#p91808</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91808#p91808"/>
		<title type="html"><![CDATA[Mod Function Arguments]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91808#p91808"><![CDATA[
If you are referring to the different bindings, each type of binding has a specific set of arguments that the called  C function is expected to accept. All in all, very much alike the normal bind command.<br><br>Perhaps an example taken from the channels module, the .+chan dcc chat command:<div class="codebox"><p>Code: </p><pre><code>/* The actual C function that will be mapped to the tcl namespace  * Compared to the tcl "bind dcc", having "handle idx text" as arguments */static void cmd_pls_chan(struct userrec *u, int idx, char *par){  char *chname;  struct chanset_t *chan;...}/* Now to map the function into a dcc partyline command * DCC CHAT COMMANDS * * Function call should be: *    int cmd_whatever(idx,"parameters"); * * NOTE: As with msg commands, the function is responsible for any logging. */static cmd_t C_dcc_irc[] = {...  {"+chan",    "n",     (Function) cmd_pls_chan,   NULL},...  {NULL,       NULL,    NULL,                      NULL}};</code></pre></div>The C_dcc_irc array is then used with add_builtins and del_builtins, which is then responsible for creating the tcl command and mapping it to your function, and register the proper binding.<br><br>There are many kinds of "builtins", and each one has it's own setup of expected argument list, so you'll have to check/dig through the code to see what's needed for your kind of command/binding/builtin<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sun Jan 24, 2010 10:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rrc55]]></name></author>
		<updated>2010-01-23T20:22:30-04:00</updated>

		<published>2010-01-23T20:22:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91803#p91803</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91803#p91803"/>
		<title type="html"><![CDATA[Mod Function Arguments]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91803#p91803"><![CDATA[
Hi noob here working on my first mod.<br><br>I can kind of see how commands are added to the bind table but how does eggdrop know what arguments to pass to my functions when the command is issued?<br><br>Thanks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10533">rrc55</a> — Sat Jan 23, 2010 8:22 pm</p><hr />
]]></content>
	</entry>
	</feed>
