This shows you the differences between two versions of the page.
Last revision Both sides next revision | |||
openbsd:irc:kiwiircbad [2020/07/29 01:21] jrmu created |
openbsd:irc:kiwiircbad [2020/07/30 06:27] jrmu |
||
---|---|---|---|
Line 9: | Line 9: | ||
====== kcgi/ii Good ====== | ====== kcgi/ii Good ====== | ||
+ | |||
+ | php, and light javascript, but have it work without js | ||
+ | no dependencies, no sql | ||
+ | have it speak to an http<-->irc bridge | ||
+ | because not every web browser supports web sockets | ||
+ | we don't need to use ajax | ||
+ | have the server run irchttpd | ||
+ | this will accept http requests | ||
+ | and translate them to irc | ||
+ | like if you want to send a PRVIMSG | ||
+ | use the web client to send a POST request | ||
+ | that's like posting a chat message | ||
+ | i mean if you don't want ajax | ||
+ | you could just have the browser refresh every 5 seconds | ||
+ | because most ISPs will block port 6667 | ||
+ | irc is a "hacker's protocol" | ||
+ | it's blocked off on most intranets | ||
+ | so you need the web client to speak http | ||
+ | write the irc<-->httpd bridge in C | ||
+ | and then have the web client just do ajax and make simple requests to the bridge | ||
+ | you could even use curl to post on IRC | ||
+ | like if you want to fetch the chats | ||
+ | curl https://ircnow.org/?room=#team | ||
+ | GET /network/chan | ||
+ | something like that would be enough to fetch the chats | ||
+ | and if you want to send a message just send a simple post request | ||
+ | it'll be like a swiss army knife so people will use it for their own applications | ||
+ | i think it's possible to build the irc client | ||
+ | without ajax | ||
+ | if you really wanted | ||
+ | just have the browser refresh the page every 5 seconds | ||
+ | btw i'm 100% serious about the idea | ||
+ | i mean if you did it without ajax | ||
+ | this is an irc client that would work on lynx | ||
+ | that's pretty amazing | ||
+ | i'll call it the ircnow client, if you don't mind | ||
+ | just use PHP, make installing it as easy as uploading a single file | ||
+ | i'm definitely avoiding websockets | ||
+ | you can just have the web page poll every 5 seconds | ||
+ | refresh every 5 seconds | ||
+ | then it would work even with js disabled | ||
+ | you could make it have a mobile/responsive theme | ||
+ | naah doesn't even load in my browser | ||
+ | js free irc chat for the web | ||
+ | goals are: 1) works without JS, but can* use JS | ||
+ | 2) only uses PHP, no other requirements, no other dependencies | ||
+ | 3) can work for 99% of browsers out there | ||
+ | 4) has a nice clean UI | ||
+ | 5) can run on BSDs | ||
+ | what i want to do for the web client | ||
+ | is I want it to automatially connect to a bouncer | ||
+ | by default zero config necessary | ||
+ | i can provideyou the bouncers for the web client | ||
+ | it'll be more like a cgi script | ||
+ | rather than an app | ||
+ | you can use tables for layout | ||
+ | can't use grids or flexbox | ||
+ | you can use divs and tables for layout | ||
+ | you can also use display:table in css | ||
+ | https://matthewjamestaylor.com/blog/perfect-3-column.htm | ||
+ | that's how to do it using old style css | ||
+ | first get something basic running for laptops | ||
+ | later on we'll do some weird responsive hacks to make it look good on phones | ||
+ | for phones probably you just hide the left and right panes | ||
+ | and just leave the center pane | ||
+ | how about we first work on the 1st version, the one that works on old trashy browsers | ||
+ | <img src="kqJT.png"> | ||