Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  


Pages: [1]   Go Down

Author Topic: Module Problem  (Read 2319 times)

0 Members and 1 Guest are viewing this topic.


  • Guest
Module Problem
« 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?



Charles Kingsley

  • Contributor
  • *
  • Offline Offline
  • Posts: 1405
(No subject)
« Reply #1 on: August 17, 2006, 04:39:58 PM »

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?


  • Guest
(No subject)
« Reply #2 on: August 17, 2006, 04:57:57 PM »

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.

Pages: [1]   Go Up