Anope IRC Services
Anope Development => Modules => Topic started by: lavinpj1 on August 17, 2006, 04:27:54 PM
-
Hi there,
I am trying to adapt ms_send.c into ms_sasend.c, in such that svsadmins can send memos from another user. Here is the slightly adapted function:
int ms_sasend(User *u)
{
char *from = strtok(NULL, " ");
char *name = strtok(NULL, " ");
char *text = strtok(NULL, "");
int z = 0;
memo_send(from, name, text, z);
return MOD_CONT;
}
This causes segfaults, and I think I understand why. It is caused by from being the wrong type. from being a pointer rather than a real value.
I do not know C and nor am I a particuarly good module maker.
Could someone aid me on getting this to work?
Thanks
~Phil~
-
Thats a hugely abusive module. - Its like being able to forge messages. - I wouldn't be on a network using that.
I trust you aren't modifying the source are using a module?
-
Yes, it's a module not a modification.
a) I trust my svsadmins
b) The use of it is to allow users to send memos via a bot from the web. I will likely add a nick check for the bot's nick once it is up and working.
~Phil~