
November 29th, 2012, 02:48 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 1
Time spent in forums: 7 m 19 sec
Reputation 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 ?
|