| summaryrefslogtreecommitdiff | 
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2016-09-23 15:26:09 +0200 | 
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2016-09-23 15:26:09 +0200 | 
| commit | 663fe641bae1c5349e62fd8d964960fdebb97f9c (patch) | |
| tree | 87f4f3323e573c74c1eb4f08aca267907ba80d64 /src/io/network.c | |
| parent | 7e8cb867ba9ca9d0f533a8329712117ba38115a6 (diff) | |
Improves support for CTCP ACTIONs.
Diffstat (limited to 'src/io/network.c')
| -rw-r--r-- | src/io/network.c | 38 | 
1 files changed, 30 insertions, 8 deletions
| diff --git a/src/io/network.c b/src/io/network.c index 0c9cf33..edafd4f 100644 --- a/src/io/network.c +++ b/src/io/network.c @@ -500,14 +500,36 @@ int ZoO_network_send (struct ZoO_network net [const restrict static 1])  {     int const old_errno = errno; -   snprintf -   ( -      net->in, -      512, -      "PRIVMSG %s :%s\r\n", -      net->channel, -      net->out -   ); +   if (ZoO_IS_PREFIX("\001action", net->out)) +   { + +      net->out[1] = 'A'; +      net->out[2] = 'C'; +      net->out[3] = 'T'; +      net->out[4] = 'I'; +      net->out[5] = 'O'; +      net->out[6] = 'N'; + +      snprintf +      ( +         net->in, +         512, +         "PRIVMSG %s :%s\001\r\n", +         net->channel, +         net->out +      ); +   } +   else +   { +      snprintf +      ( +         net->in, +         512, +         "PRIVMSG %s :%s\r\n", +         net->channel, +         net->out +      ); +   }     errno = 0; | 


