| View previous topic :: View next topic |
| Author |
Message |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Sun Jan 01, 2006 11:25 am Post subject: help making a module |
|
|
Can someone help me make a module for eggdrop which if [getauthname $nickname] is used, the bot will /who $nick n%a and return 0 if $nickname is not online, return 1 if user is online but not authed, otherwise return $nickname's authname. I would start coding this myself, but have no idea about where to start with eggdrop programming. Im starting to learn C code.
Thanks in advance if possible!!
Chris  _________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Jan 01, 2006 5:41 pm Post subject: |
|
|
you should have asked this after learning C
anyway, here's a tip:
use dprintf(DP_SERVER, ...); to output to the server and add_builtins(H_raw, ...); to bind your handlers (functions that handle server's numeric response for auth'ed nick) _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Sun Jan 01, 2006 6:23 pm Post subject: |
|
|
Ok. I think i know what dprintf(DP_SERVER, ...); does but im not 100% sure about add_builtins(H_raw, ...);
Is it even possible to call [authname $nickname] within tcl and for this module to be able to return 0 for not found, 1 for not authed or return authname if authed.
I have no idea how to catch the raw 354 within the proc authname in C code.
Im a total newb at eggdrop C module coding...
I dont even know how to return the 0, 1 or authname in C code.
I hope you could give me some pointers on how to do this, im not asking anyone to code this for me, as im willing to learn how to build this myself, but at the rate im going i might be dead before i finish it. Any help is much appreciated.
Thanks in advance!
Chris  _________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Jan 01, 2006 6:37 pm Post subject: |
|
|
other than recommending you to buy a C book, learn C programming, practice C programming, study eggdrop core source, study existing eggdrop modules, and ultimately, write your own (in that order!), I can't help you much _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Sun Jan 01, 2006 7:00 pm Post subject: |
|
|
Ok, at this moment from looking at another post, i have got:
| Code: |
static int authname(char *nickname) {
dprintf(DP_SERVER, "WHO %s n%a", nickname);
....
}
|
thats as far as i have got, but i dont know how to catch the raw 354 within that code and then check to see if it returned if the person is not online, not authed or authed. I guess i will need to catch 2 raws, one for end of /who list, and the other which returns the 0 or the authname.
All help is appreciated!
Thanks!
Chris  _________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Jan 01, 2006 7:23 pm Post subject: |
|
|
I wonder what's your rationale of asking questions here when you won't hear the answers
you are trying to program in C without really knowing C; that's like trying to solve calculus problem with no elementary math background whatsoever, which is simply ridiculous
get a clue already, do what you were told to, you won't be sorry _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
avilon Halfop

Joined: 13 Jul 2004 Posts: 64 Location: Germany
|
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Sun Jan 01, 2006 7:37 pm Post subject: |
|
|
avilon i have already tried that, but for some reason after i type /msg <botnick> hello the bot does not reply, i can't telnet or dcc the bot, and when i go to the shell promt and kill the bot, the bot stays on irc untill it pings out. Thats why im trying to make my own eggdrop module. _________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Mon Jan 02, 2006 11:48 pm Post subject: |
|
|
| Tosser^^ wrote: | | ... but for some reason after i type /msg <botnick> hello the bot does not reply |
Perchance you have not uncommented the following (in your bot conf)?
| Quote: | #unbind msg - hello *msg:hello
#bind msg - myword *msg:hello |
As for the other (DCC Chat &c) it might be a good idea to compare your settings against the recommended ones.
PS: Until you do a course in the C programming language you're not going to have too much success in making your "own eggdrop module". _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Tue Jan 03, 2006 8:14 am Post subject: |
|
|
The bot replys to the /msg botnick hello as it should. Then when i type /msg botnick pass <password_here> the bot does not reply. Usually the bot replys password set to: <password> but i get no reply. Also i get a timeout with dcc and ctcp chat, and when i telnet to the bot, if does not reply. It does no timeout or say port not found on the shell server. I have 5 other bots on the shell which work fine, but after i used the patch by thommey and compiled and loaded the bot, i started getting these errors. I will check the logfile later and post it here. But the last time i looked, it didnt show any errors. _________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
bluescreen Voice
Joined: 07 Jan 2006 Posts: 1 Location: Sweden
|
Posted: Sat Jan 07, 2006 3:47 pm Post subject: |
|
|
I have been using Thommeys patch on a botnet with 7 bots on Quakenet for over a year without problems.
Make sure your bot is authed with Q (q.tcl or some other script works well for this)
Make sure you are authed with Q
Make sure you are running Thommeys qauth.tcl (or the lite version)
Just telnet to your bot and add yourself with your Q-auth as your handle, no need for hostmask, it's optional with this patch.
The qauth.tcl checks the channel once/minute for qauth's, so it might take up to a minute for the bot to recognize you.
//Blue. |
|
| Back to top |
|
 |
|