void (*irc_send)(struct userNode *from, const char *to, const char *msg);
static struct string_buffer input;
unsigned int size, ipos, pos, length, chars_sent, use_color;
- unsigned int expand_pos, expand_ipos, newline_ipos;
+ unsigned int expand_ipos, newline_ipos;
char line[MAX_LINE_SIZE];
if (IsChannelName(dest) || *dest == '$') {
* that requires a very big intermediate buffer.
*/
expand_ipos = newline_ipos = ipos = 0;
- expand_pos = pos = 0;
+ pos = 0;
chars_sent = 0;
while (input.list[ipos]) {
char ch, *value, *free_value;
case 's':
value = self->name;
break;
- case 'H':
+ case 'A':
value = handle ? handle->handle : "Account";
break;
+ case 'U':
+ value = message_dest ? message_dest->nick : "Nick";
+ break;
+ case 'I':
+ value = message_dest ? (IsFakeIdent(message_dest) ? message_dest->fakeident : message_dest->ident) : "Ident";
+ break;
+ case 'H':
+ value = message_dest ? (IsFakeHost(message_dest) ? message_dest->fakehost : message_dest->hostname) : "Hostname";
+ break;
#define SEND_LINE(TRUNCED) do { \
line[pos] = 0; \
if (pos > 0) { \
free(free_value);
pos += length;
if ((pos < size-1) && input.list[ipos]) {
- expand_pos = pos;
expand_ipos = ipos;
continue;
}
send_line:
- expand_pos = pos;
expand_ipos = ipos;
SEND_LINE(0);
#undef SEND_LINE