channel = -1;
if(started == STARTED_NONE && (looking_at(buf, &i, "* tells you:") || looking_at(buf, &i, "* says:") ||
looking_at(buf, &i, "* whispers:") ||
+ looking_at(buf, &i, "* shouts:") ||
+ looking_at(buf, &i, "* c-shouts:") ||
+ looking_at(buf, &i, "--> * ") ||
looking_at(buf, &i, "*(*):") && (sscanf(star_match[1], "%d", &channel),1) ||
looking_at(buf, &i, "*(*)(*):") && (sscanf(star_match[2], "%d", &channel),1) ||
looking_at(buf, &i, "*(*)(*)(*):") && (sscanf(star_match[3], "%d", &channel),1) ||
} else
if(buf[i-3] == 'r') // whisper; look if there is a WHISPER chatbox
for(p=0; p<MAX_CHAT; p++) {
- if(!strcmp("WHISPER", chatPartner[p])) {
+ if(!strcmp("whispers", chatPartner[p])) {
talker[0] = '['; strcat(talker, "] ");
chattingPartner = p; break;
}
+ } else
+ if(buf[i-3] == 't' || buf[oldi+2] == '>') // shout, c-shout or it; look if there is a 'shouts' chatbox
+ for(p=0; p<MAX_CHAT; p++) {
+ if(!strcmp("shouts", chatPartner[p])) {
+ if(buf[oldi+2] == '>') { talker[0] = '<'; strcat(talker, "> "); }
+ else if(buf[i-8] == '-') { talker[0] = '('; strcat(talker, ") "); }
+ else { talker[0] = '['; strcat(talker, "] "); }
+ chattingPartner = p; break;
+ }
}
if(chattingPartner<0) // if not, look if there is a chatbox for this indivdual
for(p=0; p<MAX_CHAT; p++) if(!StrCaseCmp(talker+1, chatPartner[p])) {
SetDlgItemText(hDlg, OPT_ChatInput, "");\r
// from here on it could be back-end\r
SaveInHistory(mess);\r
- if(!strcmp("WHISPER", chatPartner[partner]))\r
+ if(!strcmp("whispers", chatPartner[partner]))\r
sprintf(buf, "whisper %s\n", mess); // WHISPER box uses "whisper" to send\r
+ else if(!strcmp("shouts", chatPartner[partner]))\r
+ sprintf(buf, "shout %s\n", mess); // SHOUT box uses "shout" to send\r
else {\r
if(!atoi(chatPartner[partner])) {\r
sprintf(buf, "> %s\r\n", mess); // echo only tells to handle, not channel\r