Chambahs wrote: |
I know for sure it is. But do you want to keep the bot on a certain chat channel, or do you want the bot just relaying messages to different chat channels? |
Code: Show/Hide local void v_send_msg(LinkedList *set, char type, char sound, Player *from, const char *str, va_list ap) { int size; char _buf[256]; const char *ctype = get_chat_type(type); struct ChatPacket *cp = (struct ChatPacket*)_buf; size = vsnprintf(cp->text, 250, str, ap) + 6; if (type == MSG_MODCHAT) type = MSG_SYSOPWARNING; cp->pktype = S2C_CHAT; cp->type = type; cp->sound = sound; cp->pid = from ? from->pid : -1; if (net) net->SendToSet(set, (byte*)cp, size, NET_RELIABLE); if (chatnet && ctype) { if (from) chatnet->SendToSet(set, "MSG:%s:%s:%s", ctype, from->name, cp->text); else chatnet->SendToSet(set, "MSG:%s:%s", ctype, cp->text); } } |
Code: Show/Hide struct ChatPacket *cp = (struct ChatPacket*)_buf; |
Code: Show/Hide local void aCmd(const char *params, const char *params2, Player *p, const Target *target) { chat->SendMessage(p,"net cmd sending..."); //cpp=&cp; char buf[256]; struct ChatPacket *cpp=(struct ChatPacket*)buf; int size; //cpp->text=buf; size=snprintf(cpp->text,250,"%s","weeeeeeeeeeeeeeee")+6; cpp->pktype=S2C_CHAT; cpp->type=MSG_PUB;//79;//type; cpp->sound=0;//sound; cpp->pid=p->pid;//-1;//from ? from->pid : -1; //net->SendToSet(set,(byte*)cp,size,NET_RELIABLE); //void (*SendToOne)(Player *p, byte *data, int length, int flags); net->SendToOne(p,(byte*)cpp,size,NET_RELIABLE); chat->SendMessage(p,"net cmd sent"); return; } |
Cheese wrote: |
never used a debugger, and how would i debug a dll? :S |
Cheese wrote: |
unrelated: why does
chat->SendMessage(p,"| %-15c | %-80c |","string","string"); output wierd chars instead? |