EldinZenderink / SimpleIRCLib

A lightweight, simple to use and implement, IRC library with support for DCC download (no upload)
MIT License
14 stars 14 forks source link

Sending Message isn't working #8

Closed aykuter closed 6 years ago

aykuter commented 6 years ago

Hey! It's me again :) I'm sorry for bothering you again. I can't send any messages with sendMessage function. There is no debug message too. Am i missing something or there is a problem ? Thanks !

https://prnt.sc/i8nber

EldinZenderink commented 6 years ago

Right I am honestly not sure why it's doing that. Maybe a a test you should download a irc client such as hexchat, connect to an irc server (such as irc.rizon.net) and join your own channel (define the channel as the ircStart parameter, such like: #mytestchannelforblablabla), then do the same with your irc client and check if sending and receiving is working.

aykuter commented 6 years ago

When i define the channel with irc parameter it's joining the channel succesfully. And i can send messages to connected channel. But as i told you i want to connect multiple channels so when the start i'm leaving channel parameter blank. When i try to send message as ( JOIN #channelname or /join #channelname ) it's not working. When i connect some channel with writing it to a parameter it's connecting but again i can't connect any other channel with sending messages. Now i will check sendMessage function and channel parameter i hope i can find something

Update 1: I think i should send raw message to the server. Like you did on the writeIrc function. I'm still trying to figure it out.

Update 2: I managed the join another channel with sending raw message to server. But i think i'm making two connections to the server. Do you have any other solution for me ? :)

Here is my way:

IrcConnect test;
test = new IrcConnect(server,port,username,password,channel,irc);
test.writeIrc("JOIN #anychannelname");

Can i send message to the server without calling ircconnect again ?

Update 3: Ooopps there is sendRawMessage Function. I don't have to use IrcConnect again. My problem solved. Thanks! :)