200 posts
Location
Scotland
Posted 13 December 2012 - 02:23 PM
Hello, this is a simple chat program I wrote a while ago! All you need is a computer (preferably colour) with a modem and your good to go!
Features:
- Does not require a server program!
- Simple IM styled chat
- Channels and colour too!
- Scrollable chat (Bar goes yellow when scrolling - see screenshots)
- Nice slash command system
The chat will work as far as rednet can reach! Default is 60 blocks at minimum height.
Downloadcommands:
/exit - leaves in a friendly manner and exits the program! (<name> has quit!)
/quit - same as /exit
/me - roleplay like talking for example, /me is a pie! -&gt; <name> is a pie!
/channel <number> - switch channel example: /channel 10
/list - shows who is in the channel
/clear - clears the chat
/help - no need to explain what that does
/nick <nickname> - Changes your nickname
Planned Changes
Add colour support - Addedre-do chat to be more supportive of slash commands - DoneAdd in channel switching - AddedAdd history / scrollable chat - Added- Add in user filtering
- Add channel 'admins'
- Channel 'dictionary' ?
Changelog:
Spoiler
1.5- Added /quit command, does the same thing as /exit
- Added some arguments so you can launch the program with your username directly or launch it a bit easier with other programs (OS and such)
- Updated to Computercraft 1.6+
1.4.2- Exit will now exit instead of rebooting
1.4- Added scrollable chat
- Added /help command
- Bottom bar has yellow pixels when scrolling!
1.3.31.3.2- Did a code clear-up (its a lot tidy now)
- Added new private / public config options
1.3.1- Added channel support
- Added '/me' command
- Added '/channel' command
1.3- Added Colour Support
- Created a whole new commands system
1.22- Added Dark Chat to my github
- Added my auto updater function (might end up using my api but we'll see)
1.2- Fixed the 'sending to self' problem
- Changed communication from split to tables (more supportive
1.1- Added "enter" and "leave" message
1.0Screenshots:
Spoiler
Any suggestions? found a bug?
leave a comment below!</number></name></name>
Check out my other programs!
Edited on 20 April 2014 - 06:14 PM
14 posts
Posted 25 February 2013 - 05:22 AM
uhmmm. So I'm not sure why, but I'm on my friends server with this chat and whenever i join, leave, or chat, it says it twice…
1688 posts
Location
'MURICA
Posted 25 February 2013 - 05:35 AM
Methinks that the program is receiving rednet signals from itself in that case.
21 posts
Location
In the TARDIS, somewhere in time and space
Posted 25 February 2013 - 12:09 PM
Oh my god, you deserve a medal. I've been trying to write something like this, but I kept messing up, haha.
671 posts
Location
That place over there. Y'know. The one where I am.
Posted 25 February 2013 - 12:55 PM
This topic got no posts up until today? Wow. Two months.
I'm making a new program a lot like this, but with colour, and support for channels.
1511 posts
Location
Pennsylvania
Posted 25 February 2013 - 12:57 PM
Looks nice, never even saw this thread before or I would have posted a response :P/>
EDIT: Can two users have the same name? If so you should store all nicknames in a file and compare before they can join.
200 posts
Location
Scotland
Posted 26 February 2013 - 06:56 AM
Didn't think anyone was interested in this program :o/>
But anyway I did a small update and fixed the "sending to self" problem.
Looks nice, never even saw this thread before or I would have posted a response :P/>
EDIT: Can two users have the same name? If so you should store all nicknames in a file and compare before they can join.
I'm planning to do this soon, as well as a channels feature.
Edit: Added dark chat to my github, bring on auto updates!
1511 posts
Location
Pennsylvania
Posted 26 February 2013 - 09:13 AM
Didn't think anyone was interested in this program :o/>
But anyway I did a small update and fixed the "sending to self" problem.
Looks nice, never even saw this thread before or I would have posted a response :P/>
EDIT: Can two users have the same name? If so you should store all nicknames in a file and compare before they can join.
I'm planning to do this soon, as well as a channels feature.
Edit: Added dark chat to my github, bring on auto updates!
I will be pleased to see how this program plays out once the channels and all are added. Keep up the great work!
200 posts
Location
Scotland
Posted 26 February 2013 - 10:32 AM
Added colour support and a whole new slash command handler.
1511 posts
Location
Pennsylvania
Posted 26 February 2013 - 10:34 AM
Loving it. Keep it up ;)/>
200 posts
Location
Scotland
Posted 26 February 2013 - 11:17 AM
Loving it. Keep it up ;)/>
And boom! channel support like a boss.
21 posts
Location
In the TARDIS, somewhere in time and space
Posted 26 February 2013 - 08:29 PM
Colour chat and Channel Switching? *pukes rainbows*
I saw this yesterday and it is already so much better! c:
200 posts
Location
Scotland
Posted 27 February 2013 - 07:02 AM
Colour chat and Channel Switching? *pukes rainbows*
I saw this yesterday and it is already so much better! c:
Yeah when I put my mind to something usually it gets done quick :)/>
hopefully I'll have slash colours working sometime soon (or even bukkit colours)
Edit: added config option for public / private
Edit2: Added the '/list' command to see who's online
21 posts
Location
In the TARDIS, somewhere in time and space
Posted 27 February 2013 - 04:18 PM
Colour chat and Channel Switching? *pukes rainbows*
I saw this yesterday and it is already so much better! c:
Yeah when I put my mind to something usually it gets done quick :)/>
hopefully I'll have slash colours working sometime soon (or even bukkit colours)
Edit: added config option for public / private
Edit2: Added the '/list' command to see who's online
I can tell!!
If you added slash colours, I would love you forever.
200 posts
Location
Scotland
Posted 28 February 2013 - 11:44 AM
Another update!
- Scrollable chat
- /help command
- new screenshots above
I need some more ideas, suggestions would be appreciated!
14 posts
Posted 28 February 2013 - 12:56 PM
Wow. I started this project back up i guess haha. Happy you fixed it so quickly, and wow and added a bunch of stuff! DARKCHAT FOR THE WIN!
14 posts
Posted 28 February 2013 - 01:18 PM
- Added new private / public config options
What exactly do the public / private options do? What is the difference?
Also, on another note: I tried tweaking the code a bit by changing the os.reboot() for the /exit to shell.run("startup") so it won't kill anything else running, but darkchat gui shows up over everything, and if I ctrl + t the startup program it brings me back into DarkChat as if I never left. crtl + t that and I get a lovely error:
parallel:22: Terminated
then I tried:
term.clear()
shell.run("startup")
exit()
which gave me this
parellel:22: b:302 attempt to call nil
200 posts
Location
Scotland
Posted 28 February 2013 - 09:01 PM
- Added new private / public config options
What exactly do the public / private options do? What is the difference?
-snip-
Private option makes it so that you can set a username and default channel which is saved, so in a sense it will auto-login as the set user.
Public option doesn't save the user on restart or exit.
And yes there's a reason I used os.reboot :)/> All the functions would have to return to exit parallel, shell.run("shell") might work, however it would just run shell on top of everything else (not a good idea).Edit: Took a look into it and made a few changes, so now the program will exit on /exit instead of rebooting, wasn't actually that hard to implement :)/>
7 posts
Posted 01 March 2013 - 11:18 AM
I've installed this program on my test server. It was nice. Tell me, was it hard coding it?
200 posts
Location
Scotland
Posted 02 March 2013 - 11:38 PM
I've installed this program on my test server. It was nice. Tell me, was it hard coding it?
Not really, some parts took a lot of brainstorming but most of the code I wrote didn't take much thought, this program is unique as usually I don't write totally event based programs.
If you have any suggestions feel free to drop a comment :)/>
14 posts
Posted 17 March 2013 - 07:01 AM
I've been trying for a while to make the chat program run something after, but I'm not sure how to do this. Help? I tried changing a couple things, but I'm not sure how your code works exactly with the whole "/exit" thing.
451 posts
Location
The left part of this post
Posted 17 March 2013 - 07:58 AM
for channels you can modify you recieve and send functions o the channel can be a text!!
51 posts
Posted 19 March 2013 - 08:43 AM
uhmmm. So I'm not sure why, but I'm on my friends server with this chat and whenever i join, leave, or chat, it says it twice…
I think you are printing it first.
Delete that line
(For example:
input = read()
print(input)
rednet.send(input)
rednet.receive()
)
delete 'print(input)' here
200 posts
Location
Scotland
Posted 19 March 2013 - 12:39 PM
I've been trying for a while to make the chat program run something after, but I'm not sure how to do this. Help? I tried changing a couple things, but I'm not sure how your code works exactly with the whole "/exit" thing.
When you type '/exit' the function is called in the commands table (comD), it then queues the event 'exit' which the function 'exitEventListen' is waiting for, when that function returns it causes parallel function to also return, exiting the program.
If you wanted to run a program on exit, you could either add shell.run("<program name>") right at the bottom under parallel or add another function in to run after the parallel function has returned.
Hope this helps :)/>
for channels you can modify you recieve and send functions o the channel can be a text!!
Kinda like a label instead of number type thing? I could do something like that.
uhmmm. So I'm not sure why, but I'm on my friends server with this chat and whenever i join, leave, or chat, it says it twice…
I think you are printing it first.
Delete that line
(For example:
input = read()
print(input)
rednet.send(input)
rednet.receive()
)
delete 'print(input)' here
This was fixed ages ago…
14 posts
Posted 26 March 2013 - 07:45 AM
I've been trying for a while to make the chat program run something after, but I'm not sure how to do this. Help? I tried changing a couple things, but I'm not sure how your code works exactly with the whole "/exit" thing.
When you type '/exit' the function is called in the commands table (comD), it then queues the event 'exit' which the function 'exitEventListen' is waiting for, when that function returns it causes parallel function to also return, exiting the program.
If you wanted to run a program on exit, you could either add shell.run("<program name>") right at the bottom under parallel or add another function in to run after the parallel function has returned.
Hope this helps :)/>
- snip -
I tried tweaking this part. Gives me an error when i open some other things and has a little blinking cursor even when other programs are running.
function exitEventListen()
while true do
os.pullEvent("exit")
modem.closeAll()
term.clear()
term.setCursorPos(1,1)
shell.run("/mrom/menus/rednet")
return exit
end
end
also tried this
function exitEventListen()
while true do
os.pullEvent("exit")
modem.closeAll()
term.clear()
term.setCursorPos(1,1)
return
shell.run("/mrom/menus/rednet")
end
end
EDIT: The error it gave me was this:
parallel:22: serialize:1: attemp to index ? (a nil value)
182 posts
Posted 26 March 2013 - 07:56 AM
You should check out Nova IRC
200 posts
Location
Scotland
Posted 27 March 2013 - 08:22 AM
–derp double post… —
200 posts
Location
Scotland
Posted 27 March 2013 - 08:24 AM
-snip-
Line 308:
["exit"] = {
run = function()
rSend("has quit.", true)
os.queueEvent("exit")
end,
help = ""
},
try:
["exit"] = {
run = function()
rSend("has quit.", true)
os.queueEvent("exit")
shell.run("/mrom/menus/rednet")
end,
help = ""
},
14 posts
Posted 01 April 2013 - 09:30 AM
I tried that and it just exits when I type /exit
and I have no clue why
EDIT: by exit, I mean it just drops you into the terminal and doesn't run the program.
200 posts
Location
Scotland
Posted 02 April 2013 - 10:17 PM
I tried that and it just exits when I type /exit
and I have no clue why
EDIT: by exit, I mean it just drops you into the terminal and doesn't run the program.
Okay, I'll look into it.
3 posts
Posted 02 July 2013 - 12:38 PM
Can you add a function to change your nickname by typing /nick followed by your username?
200 posts
Location
Scotland
Posted 02 July 2013 - 05:14 PM
Can you add a function to change your nickname by typing /nick followed by your username?
As you requested, I have now added this in :)/>
3 posts
Posted 02 July 2013 - 08:37 PM
Wow, that was fast. I was trying to figure out how to code it myself but i'm still learning this programming.
200 posts
Location
Scotland
Posted 03 July 2013 - 04:34 AM
Wow, that was fast. I was trying to figure out how to code it myself but i'm still learning this programming.
Yeah, I made this program to be extendible, its quite easy to add more commands, just make a new table in the comD table with a run function and help variable.
You can pretty much add whatever you want :)/>