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.

H_notc arguments

Old posts that have not been replied to for several years.
Locked
s
serra
Voice
Posts: 17
Joined: Sat Feb 22, 2003 10:24 pm

H_notc arguments

Post by serra »

Hi,

I'm working with H_notc builtin and i'm getting this error when the function is called:
[01:29] Tcl error [*notc:*]: wrong # args: should be "*notc:* nick user@host handle desto/chan keyword/nick text"

at this time the code is:

Code: Select all

static int notc_test (char *nick, char *uhost, struct userrec *u, char *dest, char *arg) {
  putlog(LOG_CMDS, "*", "notc is working");
  return 0;
}

static cmd_t notc_cmd[] = {
  {"*", "", notc_test, NULL},
  {0, 0, 0, 0}
}; 
can you tell me what are the correct arguments? i've tried some combinations like:
char *nick, char *uhost, char *hand, char *dest, char *arg

thanks
pedro
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Try reading the way other modules take there parameters.

Most use parameters lists, rather than declared variables.

This may solve your problem.
P
Photon
Op
Posts: 170
Joined: Wed Aug 28, 2002 8:00 am
Location: Liverpool, England

Post by Photon »

see my new post (yes, ok, I should read first, but I reckon its a bug...

FYI - struct userrec *u is wrong - it should be char * pHand (handle)
P
Photon
Op
Posts: 170
Joined: Wed Aug 28, 2002 8:00 am
Location: Liverpool, England

Post by Photon »

right, to confirm what I said before, it is a bug. The latest CVS version now has the fix in it, so I'm told, but the patch for 1.6.15 is this :

in /src/mod/server.mod/server.c, line 1983, this line :

Code: Select all

  H_notc = add_bind_table("notc", HT_STACKABLE, server_6char);
should be this :

Code: Select all

  H_notc = add_bind_table("notc", HT_STACKABLE, server_5char);
I presume there will be a new version soon enuff anyway 'cos of the already known bugs with 1.6.15 :)
Locked