4 #include "abstracthook.h"
12 class irchook
: public abstracthook
{
21 channelInfo(const string
&aname
):
22 name(aname
), joined(false), fetched(false), passwd("") {}
24 bool operator != (const string
&aname
) const;
25 bool operator == (const string
&aname
) const;
35 bool fonline
, flogged
, searchsincelast
, sentpass
;
38 string ircname
, emailsub
, namesub
;
40 vector
<channelInfo
> channels
;
41 vector
<string
> searchchannels
, extlisted
;
43 map
<string
, string
> awaymessages
;
44 map
<string
, time_t> pingtime
;
45 map
<imfile
, pair
<void *, string
> > transferinfo
;
47 void userstatus(const string
&nickname
, imstatus st
);
50 bool getfevent(void *fhandle
, imfile
&fr
);
52 static void connected(void *conn
, void *cli
, ...);
53 static void disconnected(void *conn
, void *cli
, ...);
54 static void newnick(void *conn
, void *cli
, ...);
55 static void gotinfo(void *conn
, void *cli
, ...);
56 static void gotchannels(void *conn
, void *cli
, ...);
57 static void getmessage(void *conn
, void *cli
, ...);
58 static void getaction(void *conn
, void *cli
, ...);
59 static void buddyonline(void *conn
, void *cli
, ...);
60 static void buddyoffline(void *conn
, void *cli
, ...);
61 static void buddyaway(void *conn
, void *cli
, ...);
62 static void connectfailed(void *connection
, void *cli
, ...);
63 static void listmember(void *connection
, void *cli
, ...);
64 static void fclog(void *connection
, void *cli
, ...);
65 static void chatnames(void *connection
, void *cli
, ...);
66 static void listextended(void *connection
, void *cli
, ...);
67 static void endextended(void *connection
, void *cli
, ...);
68 static void chatmessage(void *connection
, void *cli
, ...);
69 static void chataction(void *connection
, void *cli
, ...);
70 static void chatjoined(void *connection
, void *cli
, ...);
71 static void chatleft(void *connection
, void *cli
, ...);
72 static void chatkicked(void *connection
, void *cli
, ...);
73 static void errorhandler(void *connection
, void *cli
, ...);
74 static void nickchanged(void *connection
, void *cli
, ...);
75 static void needpass(void *conn
, void *cli
, ...);
76 static void fileoffer(void *conn
, void *cli
, ...);
77 static void filestart(void *conn
, void *cli
, ...);
78 static void fileprogress(void *conn
, void *cli
, ...);
79 static void filefinish(void *conn
, void *cli
, ...);
80 static void fileerror(void *conn
, void *cli
, ...);
81 static void chatuserjoined(void *conn
, void *cli
, ...);
82 static void chatuserleft(void *conn
, void *cli
, ...);
83 static void chatuserkicked(void *conn
, void *cli
, ...);
84 static void chatgottopic(void *conn
, void *cli
, ...);
85 static void chatuseropped(void *conn
, void *cli
, ...);
86 static void chatuserdeopped(void *conn
, void *cli
, ...);
87 static void chatopped(void *conn
, void *cli
, ...);
88 static void chatdeopped(void *conn
, void *cli
, ...);
90 static void subrequest(void *conn
, void *cli
,
91 const char * const nick
, const char * const command
,
92 const char * const args
);
94 static void subreply(void *conn
, void *cli
,
95 const char * const nick
, const char * const command
,
96 const char * const args
);
98 void rawcommand(const string
&cmd
);
99 void channelfatal(string room
, const char *fmt
, ...);
101 vector
<channelInfo
> getautochannels() const;
102 void setautochannels(vector
<channelInfo
> &achannels
);
115 void getsockets(fd_set
&rfds
, fd_set
&wfds
, fd_set
&efds
, int &hsocket
) const;
116 bool isoursocket(fd_set
&rfds
, fd_set
&wfds
, fd_set
&efds
) const;
120 bool enabled() const;
121 bool isconnecting() const;
123 bool send(const imevent
&ev
);
125 void sendnewuser(const imcontact
&c
);
126 void removeuser(const imcontact
&ic
);
128 void setautostatus(imstatus st
);
130 imstatus
getstatus() const;
132 void requestversion(const imcontact
&c
);
133 void ping(const imcontact
&c
);
135 void requestinfo(const imcontact
&c
);
136 void requestawaymsg(const imcontact
&c
);
137 void sendupdateuserinfo(icqcontact
&c
, const string
&newpass
);
139 void lookup(const imsearchparams
¶ms
, verticalmenu
&dest
);
141 void ouridchanged(const icqconf::imaccount
&ia
);
143 bool knowntransfer(const imfile
&fr
) const;
144 void replytransfer(const imfile
&fr
, bool accept
, const string
&localpath
= string());
145 void aborttransfer(const imfile
&fr
);
148 extern irchook irhook
;