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~