diff --git a/README.md b/README.md index 45e9fdd..39ab4bb 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,9 @@ You can make Caya and its protocols with: `$ make` -Caya itself requires the `expat_devel` package, and the XMPP protocol requires -`gloox_devel`. You can also build either independent of the other: +Caya itself requires the `expat_devel` package, the XMPP protocol requires +`gloox_devel`, and the (provisional) IRC protocol requires +`libircclient_devel`. You can also build either independent of the other: -`$ make caya; make protocols` +`$ make caya; make libs; make protocols; make -f protocols/xmpp/Makefile` diff --git a/protocols/Makefile b/protocols/Makefile index 3d22e7f..14d1f28 100644 --- a/protocols/Makefile +++ b/protocols/Makefile @@ -6,6 +6,6 @@ irc: xmpp: $(MAKE) -f protocols/xmpp/Makefile -all: xmpp +all: xmpp irc default: all diff --git a/protocols/irc/IrcProtocol.cpp b/protocols/irc/IrcProtocol.cpp index 000de1d..b84e4fb 100644 --- a/protocols/irc/IrcProtocol.cpp +++ b/protocols/irc/IrcProtocol.cpp @@ -5,7 +5,7 @@ #include "IrcProtocol.h" -#include +#include #include @@ -319,6 +319,15 @@ event_numeric(irc_session_t* session, unsigned int event, _SendMessage(&list); break; } + case LIBIRC_RFC_RPL_TOPIC: + { + BMessage topic(IM_MESSAGE); + topic.AddInt32("im_what", IM_ROOM_SUBJECT_SET); + topic.AddString("chat_id", params[1]); + topic.AddString("subject", params[2]); + _SendMessage(&topic); + break; + } } } @@ -430,7 +439,6 @@ _IsOwnUser(const char* userId, irc_session_t* session) BMessage ownInfo(IM_MESSAGE); ownInfo.AddInt32("im_what", IM_OWN_CONTACT_INFO); ownInfo.AddString("user_id", userId); - ownInfo.AddString("user_name", ctx->nick); _SendMessage(&ownInfo); } }