Giter VIP home page Giter VIP logo

jj's People

Contributors

aaronngi avatar dertuxmalwieder avatar josuah avatar whiteinge 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

Watchers

 avatar  avatar  avatar  avatar

jj's Issues

Can't build jjd on OpenBSD

make
cc -O2 -pipe  -pedantic -Wall -I. -I/usr/include -D_POSIX_C_SOURCE=200809L -D_POSIX_C_SOURCE=200809L -c jjd.c
CC -o jjd
cc -o jjd jjd.o -s -L/usr/lib -lc -lsocket
ld: error: unable to find library -lsocket
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error 1 in /tmp/jj (Makefile:21 'jjd')

cc is clang on OpenBSD

Utilizing locate, I see /usr/include/sys/socket.h present.

I also tried with CC = egcc in Makefile (egcc is gcc from repo to distinguish it from gcc from base),
and gmake, same:

gmake
CC -o jjd
egcc -o jjd jjd.o -s -L/usr/lib -lc -lsocket
ld: error: unable to find library -lsocket
collect2: error: ld returned 1 exit status
gmake: *** [Makefile:21: jjd] Error 1

Handle * for nickname in (in CAP ACK)

The way the code is set up to blindly fire CAP REQ :echo-message and CAP END before NICK and USER, which can lead to * being used in the ACK response (or even NAK) which confuses jjc and leads it to hang. The lines responsible are: https://github.com/aaronNGi/jj/blob/master/jjc#L321-L322

It would be ideal to either do a proper CAP LS (302) negotiation and only request echo-message if it is listed, or at the very least, handle cases where the nickname can be a * . this might also happen if one uses a nickname which is already in use while connecting, amongst other possible cases.
The "hanging" behavior is especially noticeable on current UnrealIRCd (6) releases which all have echo-message available by default. If desired or necessary, I can gladly provide a link to my own Unreal 6 instance for testing purposes.

EDIT: It may also be that one's own (U)UID is used in place of a nickname (possibly at least), although untested if jjc handles cases where it is referred to as by a different "nickname" (like (U)UID, enforced nickname by the server) when said other nickname is not * .

proposal: convert irc bold escape sequences

function parse_bold(s,
        tail)
{
        tail = s
        s = ""
        while (match(tail, "\002[^\002]*\002")) {
                s = s substr(tail, 1, RSTART - 1) "\033[1m"
                s = s substr(tail, RSTART + 1, RLENGTH - 2) "\033[m"
                tail = substr(tail, RSTART + RLENGTH)
        }
        return s tail
}

This function reads text with irc escape sequence, and returns the same string with the ^B converted to \033[1m or \033[m (if beginning or end).

Text with ^Bbold^B characters -> Text with \033[1mbold\033[m characters

I let you decide whether and how to integrate it

Can't build jjd on OmniOS

Environment:

> uname -smr
SunOS 5.11 i86pc

Building:

[~]> cd jj
[~/jj]> make
CC jjd.c
cc -c -pedantic -Wall -I. -I/usr/include -D_POSIX_C_SOURCE=200809L jjd.c
jjd.c: In function 'input_from_socket':
jjd.c:113:6: warning: implicit declaration of function 'dprintf'; did you mean 'vprintf'? [-Wimplicit-function-declaration]
  113 |  if (dprintf(*pipe_fd, "i %ju %s\n", (uintmax_t)time(NULL), buf) < 0)
      |      ^~~~~~~
      |      vprintf
CC -o jjd
cc -o jjd jjd.o -s -L/usr/lib -lc
Undefined                       first referenced
 symbol                             in file
__xnet_connect                      jjd.o
__xnet_socket                       jjd.o
__xnet_getaddrinfo                  jjd.o
dprintf                             jjd.o
freeaddrinfo                        jjd.o
ld: fatal: symbol referencing errors. No output written to jjd
collect2: error: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `jjd'

I would imagine that there are more dependencies needed than just a C compiler and awk.

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.