Git Product home page Git Product logo

smartirc4net's People

Contributors

agametov avatar bawng avatar deathbynukes avatar freeapophis avatar gmt2001 avatar johansson avatar kabili207 avatar lformella avatar mauricelemur avatar meebey avatar ravualhemio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smartirc4net's Issues

Issue Regarding Message Queueing and Ping Timeout

Hello,

I use SmartIrc4net in a library I develop for communicating with Twitch and the chat system (IRC-based). There's been an issue where after a random amount of time (sometimes several hours, sometimes several days) the the SmartIrc4net implementation hangs up and times out. @Danatobob and I have been working to figure out if it's an issue with TwitchLib or SmartIrc4net, and we're fairly confident it is with SmartIrc4net.

Since neither of us are super fluent with the SmartIrc4net, we were hoping you might be able to shed some light on the possible issue.
Here is the link to the issue: TwitchLib Issue #81

Using the built in logger in SmartIrc4net, @Danatobob was able to get a pretty good dump of events in IrcConnection object as seen starting at this comment and below: Comment with Debug

Extracted from his post, we get correct activity which would read something like this:

2016-11-28 00:21:38,899 [IdleWorkerThread (irc.chat.twitch.tv:6667)] DEBUG SOCKET - sent: "PING irc.chat.twitch.tv"
2016-11-28 00:21:39,112 [ReadThread (irc.chat.twitch.tv:6667)] DEBUG SOCKET - received: ":tmi.twitch.tv PONG tmi.twitch.tv :irc.chat.twitch.tv"
2016-11-28 00:21:39,112 [14] DEBUG QUEUE - read: ":tmi.twitch.tv PONG tmi.twitch.tv :irc.chat.twitch.tv"

however, after some time (not easy to consistently identify when/why the bad behavior starts), this will occur:

2016-11-28 00:25:38,901 [IdleWorkerThread (irc.chat.twitch.tv:6667)] DEBUG SOCKET - sent: "PING irc.chat.twitch.tv"
2016-11-28 00:25:39,113 [ReadThread (irc.chat.twitch.tv:6667)] DEBUG SOCKET - received: ":tmi.twitch.tv PONG tmi.twitch.tv :irc.chat.twitch.tv"
2016-11-28 00:28:03,216 [ReadThread (irc.chat.twitch.tv:6667)] DEBUG SOCKET - received: "PING :tmi.twitch.tv"
2016-11-28 00:31:38,903 [IdleWorkerThread (irc.chat.twitch.tv:6667)] WARN SOCKET - ping timeout, connection lost

Importantly, as noted by @Danatobob, DEBUG QUEUE doesn't react to PONG.
He goes on to provide further error logs I have provided one here: danatobob_irc_errorlog_full.txt that will likely prove useful in determing the source of the error. The issue starts shortly before the repeated sending data failed, connection lost
We would be very grateful for any insight on this issue.

Thanks

Auto retry never happens if exception is thrown

Exception: Could not connect to: kornbluth.freenode.net:8000 Connection refused
  at Meebey.SmartIrc4net.IrcConnection.Connect (System.String[] addresslist, Int32 port) [0x00000] in <filename unknown>:0
  at Meebey.SmartIrc4net.IrcClient.Connect (System.String[] addresslist, Int32 port) [0x00000] in <filename unknown>:0

This happened, and it never connected to any other server in the list.

512 Char Limit ???

Really Meebey?

This Needs Fixed ASAP. I Can't send Message over 500 chars to my friends of long url describing very important rap lyric.

Who think smart to limit char to 500 message in 2014? LOL my bruh im not Lil Wayne I rap for real i Need mor than 500 chars to drop my bars

Round-robin connection crash when shortening address list

I haven't checked this, but if I'm reading the code in IrcConnection.cs properly, is there not potential for an IndexOutOfBoundsException under the following circumstances:

  1. Turn AutoRetry on
  2. Provide a series of addresses in Connect
  3. Retry advances one or more times to position X in the list before a successful connection
  4. Later, you call Connect again with a shorter list of addresses
  5. First connection attempt is at position X; if X > number of addresses in the new list, the index is out of bounds

_NextAddress() is never called / _CurrentAddress is never reset to 0 at the beginning of a new connection attempt, I think? Could someone confirm this?

Can't send message with a variable?

This is the code I use
WebClient c = new WebClient();
string data = "";
data = c.DownloadString("website");
irc.SendMessage(SendType.Message, "#channel", "Message: " + data);

When it sends the message it just says Message:
If I have it read a float then it can send it in the message but if I have it send data from a string it doesn't work.

Documentation Question

Hi, I'm a bit new to C# Development and I'm building an IRC Client. When searching for documentation, I found this link on the website: https://www.aspfree.com/c/a/.NET/Using-SmartIrc4net/

It was written in 2006 and so I'm just curious whether it's still relevant/up-to-date. I'm a bit new to C# Development and so I've had a bit of trouble trying to wrap my head around how to use this library. The website lists the API and examples, but I have a hard time making any sense of them: http://www.meebey.net/projects/smartirc4net/#index5h2

Windows username exposed

this client is exposing my windows username somehow, tried to find where in the code it gets it from, couldn´t find it

Issue with disconnecting

                try
                {
                    while (_Connection.IsConnected &&
                           ((data = _Connection._Reader.ReadLine()) != null))
                    {
                        _Queue.Enqueue(data);
                        QueuedEvent.Set();
                    }
                }

I'm having some problems with this portion of the code. When I am telling the IRC bot to Disconnect(), it is hanging at _Thread.Join() until the ReadLine() goes through the loop (when it receives another message in a channel or anything that causes ReadLine() to have data), at which time it catches the Abort() call.

This is causing me problems with the bot hanging after I tell it to disconnect, it won't actually disconnect until something is first received.

Am I doing something wrong here?

Key duplication on join event

I'm using a bouncer that automatically joins channels, and whenever it reconnects to the IRC server, smartirc4net crashes.

System.ArgumentException: Key duplication when adding: #channelname
  at System.Collections.Hashtable.PutImpl (System.Object key, System.Object value, Boolean overwrite) [0x00000] in <filename unknown>:0
  at System.Collections.Hashtable.Add (System.Object key, System.Object value) [0x00000] in <filename unknown>:0
  at System.Collections.Hashtable+SyncHashtable.Add (System.Object key, System.Object value) [0x00000] in <filename unknown>:0
  at Meebey.SmartIrc4net.IrcClient._Event_JOIN (Meebey.SmartIrc4net.IrcMessageData ircdata) [0x00000] in <filename unknown>:0
  at Meebey.SmartIrc4net.IrcClient._HandleEvents (Meebey.SmartIrc4net.IrcMessageData ircdata) [0x00000] in <filename unknown>:0
  at Meebey.SmartIrc4net.IrcClient._Worker (System.Object sender, Meebey.SmartIrc4net.ReadLineEventArgs e) [0x00000] in <filename unknown>:0
  at (wrapper delegate-invoke) <Module>:invoke_void__this___object_ReadLineEventArgs (object,Meebey.SmartIrc4net.ReadLineEventArgs)
  at Meebey.SmartIrc4net.IrcConnection.ReadLine (Boolean blocking) [0x00000] in <filename unknown>:0
  at Meebey.SmartIrc4net.IrcConnection.Listen (Boolean blocking) [0x00000] in <filename unknown>:0
  at Meebey.SmartIrc4net.IrcConnection.Listen () [0x00000] in <filename unknown>:0

broken links

https://www.meebey.net/projects/smartirc4net/

The "API Documentation" link tells me "You don't have permission to access this resource." which makes development a bit trickier

The "DeveloperLand Article" link cannot be reached

The "ASP Free Article" can not be reached

As a developer searching for a simple to use IRC library it's not making a good first impression.

OnJoin not reliable?

I'm trying to build a bot that keeps a list of logged in user nicks. I'd like to create an initial list when the room is first entered, then keep the list up to date anytime a new user joins. I tried OnChannelActiveSynced and OnChannelPassiveSynced, but when I call GetChannel, only the bot shows up in the "users" property.
I noticed that sometimes when the bot joins, OnJoin will be called for each currently logged in user so I wrote the below code to build the "useList" one nick at a time. Other times though, OnJoin is only called once for the bot and isn't called for each logged in user. Why would the behavior change?

Is it possible the channel I'm connecting to has different sync rules/settings? Maybe my bot is rejoining too quickly so it's not actually resyncing the room correctly?
I can't think of what else might be causing this unreliable behavior.

Please let me know if there is a better place to post and thanks for any help!


irc.OnJoin += new JoinEventHandler(OnJoin);

private void OnJoin(object sender, IrcEventArgs e)
{
  if (!irc.IsMe(e.Data.Nick))
  {
    if (!userList.Contains(e.Data.Nick))
    {
      userList.Add(e.Data.Nick);
    }
  }
}

Deprecated stuff

I understand that is still works just fine, but getting rid of deprecating things is desired.

IrcClient\IrcClient.cs(102,102): Warning CS0618: 'System.Collections.CaseInsensitiveHashCodeProvider' is obsolete: 'Please use StringComparer instead.' (CS0618)

IrcClient\IrcClient.cs(84,84): Warning CS0618: 'System.Collections.Hashtable.Hashtable(System.Collections.IHashCodeProvider, System.Collections.IComparer)' is obsolete: 'Please use Hashtable(IEqualityComparer) instead.' (CS0618)

IrcFeatures\DccConnection.cs(26,26): Warning CS0618: 'System.Net.IPAddress.Address' is obsolete: 'This property has been deprecated. It is address family dependent. Please use IPAddress.Equals method to perform comparisons. http://go.microsoft.com/fwlink/?linkid=14202' (CS0618)

Listen(true) not working

Hi,

when I use Listen() overload it works fine, but as soon as I set blocking to false, no events are being fired, is that a bug?

Thanks in advance

WebSockets support

Right now SmartIrc4net only supports bare TCP sockets to connect to IRC servers but some IRCd implementations support WebSockets and thus SmartIrc4net should provide internally an abstraction that can cope with this. This was already troublesome when proxy support was added, it had to be glued into the connection handling itself, instead of being "stackable".

No Unicode IN My User Name

Meebey... come on !

I want to change my User name to Unicode.

2Chainz№Homo

IRC is unable to portray my swag how can i prove im not a fag

Outdated documentation and build files

Many of these date back from Ye Olden Days of .NET 1.1.

  • CSharpBuilder/: Outdated Borland project files from 12 years ago, doesn't match the structure of the project nowadays.
  • docs/: Just the IRC RFC. Not needed, could be supplemented if need be.
  • API_CHANGE: Affects an ancient branch.
  • CHANGELOG: Very outdated, somewhat redundant with git log.
  • CREDITS: outdated, should be updated or use the copyright comment headers
  • FEATURES: outdated
  • README: project filesystem structure outdated
  • TODO: outdated, should be put into issues?

Dependencies

Based on a user's experience in #smuxi-devel and my own experience when first using SmartIrc4net.

I propose removing StarkSoft proxy's source code from the tree, and adding NuGet package config references for log4net and StarkSoft's updated proxy code StarkSoft.Aspen.Proxy, then changing the namespaces in our code from StarkSoft.Net.Proxy.

This will allow users to just clone the repo, double-click the .sln and compile without any reference or assembly errors as NuGet will restore the missing dependencies automatically.

IrcConnection trapped in queue loop

I am using smartirc4net-0.4.5.1 and the IrcClient class.

Today the IrcConnection somehow went into some kind of queue loop, writing two lines over and over into my log:

...
03-09-2013 20:23:29,427 WARN [WriteThread (irc.worldwideirc.net:6667)] 0:SOCKET.sending data failed, connection lost
03-09-2013 20:23:29,427 WARN [WriteThread (irc.worldwideirc.net:6667)] 0:QUEUE.Sending data was not sucessful, data is requeued!
03-09-2013 20:23:29,627 WARN [WriteThread (irc.worldwideirc.net:6667)] 0:SOCKET.sending data failed, connection lost
03-09-2013 20:23:29,628 WARN [WriteThread (irc.worldwideirc.net:6667)] 0:QUEUE.Sending data was not sucessful, data is requeued!
03-09-2013 20:23:29,828 WARN [WriteThread (irc.worldwideirc.net:6667)] 0:SOCKET.sending data failed, connection lost
03-09-2013 20:23:29,829 WARN [WriteThread (irc.worldwideirc.net:6667)] 0:QUEUE.Sending data was not sucessful, data is requeued!
03-09-2013 20:23:30,029 WARN [WriteThread (irc.worldwideirc.net:6667)] 0:SOCKET.sending data failed, connection lost
03-09-2013 20:23:30,030 WARN [WriteThread (irc.worldwideirc.net:6667)] 0:QUEUE.Sending data was not sucessful, data is requeued!
03-09-2013 20:23:30,230 WARN [WriteThread (irc.worldwideirc.net:6667)] 0:SOCKET.sending data failed, connection lost
03-09-2013 20:23:30,230 WARN [WriteThread (irc.worldwideirc.net:6667)] 0:QUEUE.Sending data was not sucessful, data is requeued!
03-09-2013 20:23:30,431 WARN [WriteThread (irc.worldwideirc.net:6667)] 0:SOCKET.sending data failed, connection lost
03-09-2013 20:23:30,431 WARN [WriteThread (irc.worldwideirc.net:6667)] 0:QUEUE.Sending data was not sucessful, data is requeued!
03-09-2013 20:23:30,632 WARN [WriteThread (irc.worldwideirc.net:6667)] 0:SOCKET.sending data failed, connection lost
03-09-2013 20:23:30,632 WARN [WriteThread (irc.worldwideirc.net:6667)] 0:QUEUE.Sending data was not sucessful, data is requeued!
...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.