rcr / rirc

A terminal IRC client in C
https://rcr.io/rirc/
MIT License
142 stars 17 forks source link

/RAW changed to /CMD_IRC, NICK Crash fix. #7

Closed ghost closed 9 years ago

ghost commented 9 years ago

diff 1:

Instead of using /RAW IRC_CMD, Now it's /IRC_CMD. if the typed commands exists in the irc_commands array, we will call send_raw.

diff 2:

when i typed /NICK, rirc (on startup) crashes.

rcr commented 9 years ago

Thanks for the contribution, I appreciate the help.

Made some comments inline, if you'd like to --amend your commit

ghost commented 9 years ago

thanks for the notes,

if we will keep /RAW, it will force the user to do something like: /RAW whois IRC_NICK

Instead of (it's more convenient): /whois IRC_NICK

i wrote send_cmd_exists() just for this reason. but if you want to keep it (it's your project :smiley:) i will rewrite it.

rcr commented 9 years ago

Actually I meant keeping /raw alongside your changes. I use it quite a bit for testing, and it allows the user to send arbitrary commands that might be supported by the server but isn't specifically listed as a command in rirc.

So "/whois nick" and "/raw WHOIS nick" would be equivalent

ghost commented 9 years ago

Updated,

another segfault i found:

  1. /Join to a channel
  2. /close the channel (many times the segfault happens here)
  3. trying to /join to another channel (segfault)
rcr commented 9 years ago

I think free_input is causing the segfault. It might be a change I made last commit to input.c.

This is why I really need to come up with some tests :smiley: That's going to be a major task which I plan to do soon.

ghost commented 9 years ago

i added the "R" mode for "registered nicknames only",

you can merge it now :smiley:

rcr commented 9 years ago

UMODE_MAX should be bumped to 8 and then I'll merge