This is to explicitly send the correct encoding to the IRC server. We’re only going to use one for this example, so it can be hard coded, but this way you can see how it’s done and easily modify it for multiple channels if you’d like.Here we take in the channel name, as part of the function, then send the join command to the IRC network.The ‘bytes’ part lets us specify to send the message encoded as UTF-8. Connecting to IRC is good, but unless we’re in a channel with other users it won’t be of much use! We’re putting this in a function instead of hard coding it like the nnect part above because you can be in multiple channels with a single connection.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |