On 02/04/2015 07:56 PM, IOhannes m zmölnig wrote: > On 02/04/2015 05:54 PM, Antonio Roberts wrote: >> Hi everyone, >> >> Is there an object available to connect Pure Data to an IRC channel? I >> want to be able to send and receive messages. > > > [tcpclient]? >
here's a working example, using [tcpclient] and the pdstring library. apologies to the people at #dataflow (whoever uses the patch, please do change the channel you are connecting to) gfmards IOhannes
#N canvas 406 213 714 409 10; #X obj 41 158 tcpclient; #X obj 212 193 pdstring/any2string 0 13; #X msg 245 53 USER pdbot 8 * : IRCclient in Pd; #X obj 41 270 pdstring/string2any; #X obj 41 292 route PING; #X obj 41 314 list prepend PONG; #X obj 252 375 print fromIRC; #X msg 265 81 JOIN #dataflow; #X msg 275 170 QUIT; #X obj 41 336 t a a; #X msg 41 4 connect irc.freenode.net 6667; #X msg 212 29 NICK pdbot54321; #N canvas 342 336 450 300 accum 0; #X obj 68 43 inlet; #X obj 68 65 route bang; #X obj 112 179 t l l; #X obj 68 206 list; #X obj 68 228 t l b; #X obj 112 157 list prepend; #X obj 68 250 outlet; #X connect 0 0 1 0; #X connect 1 0 3 0; #X connect 1 1 5 0; #X connect 2 0 3 1; #X connect 2 1 5 1; #X connect 3 0 4 0; #X connect 4 0 6 0; #X connect 4 1 2 0; #X connect 5 0 2 0; #X restore 41 221 pd accum; #X obj 41 243 route bang; #X msg 67 72 disconnect; #X obj 41 180 route 13 10; #X msg 41 202 bang; #X obj 275 136 list prepend PRIVMSG #dataflow :; #X msg 276 114 it still works...; #X text 408 114 <-- your message goes here; #X connect 0 0 15 0; #X connect 1 0 0 0; #X connect 2 0 1 0; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 4 1 6 0; #X connect 5 0 9 0; #X connect 7 0 1 0; #X connect 8 0 1 0; #X connect 9 0 1 0; #X connect 10 0 0 0; #X connect 11 0 1 0; #X connect 12 0 13 0; #X connect 13 1 3 0; #X connect 14 0 0 0; #X connect 15 0 16 0; #X connect 15 2 12 0; #X connect 16 0 12 0; #X connect 17 0 1 0; #X connect 18 0 17 0;
signature.asc
Description: OpenPGP digital signature
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
