Thread: A little help..

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    1
    Rep Power
    0

    A little help..


    Hello, i need some help... I want to make an command for an emech like !timer nick \ !timer stop...


    void do_timer(char *from, char *to, char *rest, int cmdlevel)
    {
    char *chan;
    aChanUser *CU;
    aChan *Chan;
    aTime *tmp;
    char newnuh[NAMELEN];
    int isbot;

    chan = get_channel(to,&rest);
    if (get_userlevel(from,chan) < cmdlevel)
    return;
    if(!rest) { sendprivmsg(chan,"use like : timer <nickname>"); return; }
    if(strstr(rest,"stop")!=NULL) {
    sendprivmsg(chan,"All timers stopped!");
    to_server("");
    return;
    }
    FILE *nick;
    char cur[1024];
    memset(cur,0,1024);
    strcpy(CurrentNick,getnick(from));
    sprintf(newnuh,"%s%s",newnick,strchr(from,'!'));
    if (!Strcasecmp(CurrentNick,current->wantnick))
    send_to_server("NICK %s\n",current->wantnick);
    sendprivmsg(chan,"Timer started on nickname * %s *",rest);
    }


    i don't know how to make the lines works... when i type !timer nick the emech automaticaly puts a /timer 0 3 /nick nicknam .. and when it gets the nickname stops the timer .. and a command like !timer stop to stop the timer - /timers off.. can someone tell me how to make ?
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,897
    Rep Power
    481
    People may be ignoring you because your question is incomprehensible.
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo