Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 36 lines (32 sloc) 1.444 kb
fccc685 Initial open-source release
MLstate authored
1 % vim:syntax=erlang
2
3 %
4 % Copyright © 2011 MLstate
5 %
6 % This file is part of OPA.
7 %
8 % OPA is free software: you can redistribute it and/or modify it under the
9 % terms of the GNU Affero General Public License, version 3, as published by
10 % the Free Software Foundation.
11 %
12 % OPA is distributed in the hope that it will be useful, but WITHOUT ANY
13 % WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 % FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
15 % more details.
16 %
17 % You should have received a copy of the GNU Affero General Public License
18 % along with OPA. If not, see <http://www.gnu.org/licenses/>.
19 %
20
21 -define Join (chan, key) = "JOIN " chan " " key "\r\n"
22 -define Nick nick = "NICK " nick "\r\n"
23 -define Notice (target, msg) = "NOTICE " target " :" msg "\r\n"
24 -define Pass passwd = "PASS " passwd "\r\n"
25 -define Ping msg = "PING :" msg "\r\n"
26 -define Pong srv = "PONG :" srv "\r\n"
27 -define Privmsg (target, msg) = "PRIVMSG " target " :" msg "\r\n"
28 -define Quit = "QUIT\r\n"
29 -define User (user, host, srv, real) = "USER " user " " host " " srv " :" real "\r\n"
30
31 % These are server-formatted messages. They are slightly different from
32 % the ones used by the client.
33 -define SrvNotice (header, args) = header " NOTICE " args "\r\n"
34 -define SrvPrivmsg (header, dest, args) = header " PRIVMSG " dest " :" args "\r\n"
35 -define (Sns (srv, num, args)) = srv " " num " " args "\r\n"
Something went wrong with that request. Please try again.