Kick and ban would be good.
Printable View
Kick and ban would be good.
Wait a sec, if people who join my server can see my router IP and my comp IP would that mean they can hack me???
If you use internet explorer or the windows firewall, there's a big chance people can :D
Just kidding.
But I personally have more faith in a non-M$ firewall.
If you're so worried about getting hacked from someone knowing your IP, then may want to unplug your modem and not use the internet. ;)Quote:
Originally Posted by Justin M
lol Thanks but I would like to have a sound play when someone sends a message, where would I put the play sound code?
And when some enters the chat?
Look in the DataArrival() event to find the name of the sub that is responsible for handling when a message is received and when someone enters/leaves.Quote:
Originally Posted by Justin M
Then go to the code for that sub and put your "play sound" code there.
Sorry it's taking so long for the update. I've been real busy doing jobs on www.rentacoder.com and haven't had any free time.
lol thanks, its ok. Out of curosity, is there alot of money to be made on rentacoder?
Only if you're an advanced coder and are experienced in customer programming.
There are a lot of smaller projects < $200. There are also those that are $500-$2,000+. There's a wide variety of different types...for every possible programming language you can imagine. Not that many for VB6. Lots for PHP/MySQL, HTML, CSS, etc.
I've been doing a lot of the smaller ones, myself. Hopefully I can land a big one soon. :D
Umm this is usually to ask, but could anyone download the free antivirus prog I made and see if they can log on.
welll maybe the code here can log on my chat server, cause alot of peeps say they can't
the IP of the server is 142.167.72.254
I was wondering, is there a way to change the color of the text you type with and when you send a message the text will look the same in the conversation box?
I don't know how this app is built, but if there is a regular textbox, you need to replace it with a RichTextBox control.
With that, sending the .rtfText property (instead of the .Text), you might be able to send multiple colors, but I'm not sure though.
TheBigB is correct. If I remember my own project correctly, I used a standard TextBox to keep things as simple as possible.
My original plan was to make this and hope that people were able to learn from it and add in their own features as a learning experience, that's why I kept it so basic.
But I've gotten a lot of requests to modify it and so that is what I am almost done doing now (except I started a new one from scratch)...
Server setup wizard
Custom room creator with passworded rooms
User-created rooms
Rich text (using the RichTextBox control)
File transfers/folder sharing
Admin features for server (kick, ban, warn, global message)
Webcameras
Whiteboard
Finally done with all of my RentACoder projects so I have time to work on it now...stay tuned. :p
i am ready to see the updated version of this.
Yea lets get the super version going!!
lol
Id like to see how you do the webcams. Thats one thing I havn't been able to figure out ;]
i'm having trouble getting bold italics and underline to show in the chat window. also my users are wanting to have special colors for their names, any help.
Every time I get back to work on this, something else keeps coming up. Just want to let you know that I have been working on it and there really isn't much left to do and I am finishing it up.
Edit: minidesigner, choosing colors for names is a good idea actually, never thought of that. I will put that in there also.
I would just like to thank DigiRev... I downloaded your source and have started fine tuning it for what I am looking for personally. I just want to thank you for being willing to do so much work for no monetary reward. A lot of people wouldn't be willing to do such work. I like the classic version and will continue coding ontop of it.
Question though (for anyone) is it going to be OK to continue programming in Visual Basic 6.0 or is Visual Basic 2008 Express the way to go for free lance programming for personal use?
http://www.vbforums.com/attachment.p...id=47243&stc=1Quote:
Originally Posted by Genovah
We like to have people create their own threads for questions like this but in any case, while VB6 will be around for several years at least, (sadly) you should probably switch over to 2008.
Thanks Genovah. You're doing exactly what I was hoping most people would do. Use this as a sort of framework to build from and/or learn how to use the Winsock control. That's why I kept it so stripped-down and simple as possible.Quote:
Originally Posted by Genovah
As MartinLiss said, you may want to switch over to 2008/.NET. Personally, I've been learning C++ (which is much different) because I don't like .NET at all.
I haven't done VB6 since I was in highschool I have mostly been working on Flash projects and things of the sort but after finding this site I have found interest in program coding. I appreciate and lookforward to more projects from you and thank you both for your opinnions on which programs are best. I know very little about C++ but I like the interface of VB so maybe I'll switch over to 2008 in the near future. DigiRev is there a way to contact you personally? I would like to show you my re-vamp of your basic program... I only worked on it for a couple hours so not a whole lot has changed but perhaps with all the requests you have recieved you will have some ideas for me (not code trying to learn that on my own ;))Quote:
Originally Posted by DigiRev
Thanks Martin for the welcome! Sorry for not starting a new thread for it.
Sorry for the double post... Here is the compiled version with the changes I have made... If you would like the source just let me know and I can post that to.
Nice, looks cool. :cool: :thumb:Quote:
Originally Posted by Genovah
Thanks can't wait to see yours :)
Genovah yours looks cool.
Thanks but the credit goes to DigiRev without his source I would be dazed it has tought me a lot about Winsock and now I will be incorperating it in a lot of new projects
I recieved a PM requesting that I post the source code to the client so here it is!
Note: The source has not changed a WHOLE lot since his there is just a few added features I am still working on the rest and not ready to release it yet.
*edit* Sorry typed up the previous message on a work computer then went to upload it and realized that the source was on my home computer (Doh!) So I logged on remotely and here it is
And my newest executeable if anyone is interested... Client only (haven't had enough time to work on the server portion yet still pretty basic.)
Note: Upon closing the program it will write .txt files to "C:\Program Files\ChatterBox\" to save the settings that you have chosen... just so you are aware..
I'm looking for feedback and ideas to add to the project I already have a list wrote down of some of them. Still a work in progress (Digi is so much better at this then I, haha)
Take care all.
I made some changes, this has more options as well as a great logging system
Features:
When you close the server, the logs are updated, so you don't need to press Save Chat everytimeCode:Client:
Leave Room
Reconnect
Style Changes
Features - Run, Kill, Calc, Temp
Server:
Announce
Disconnect Clients
Style Changes
Save Chat
View Logs
Clear Logs
Features - Run, Kill, Calc, Temp
If anyone wants the source code just look below.
Do you know if there is a way to ban or disconnect troublesome members?
That would be just a matter of finding out which socket the member uses and then sck.Close.
For banning you'd get the .RemoteIP from the user before closing and put that in a 'deny connection' list in the Connection_Request event.
Exactly what TheBigB said. I'll add it into the server real quick since this update is taking a little longer than I thought.
Will post back soon.
Ok, this should work. I wrote it really quickly but it should not let them into the room once they are banned.
On the server, right-click the user list to ban a user.
The client also wasn't closing properly so that should be fixed also.
yeah i also fixed the client problemQuote:
Originally Posted by DigiRev
and i just added a block user function that works both client and server sided, it ignores the user, not disconnects him.
so that will be up soon
Here it is
I got rid of those other, unnecessary features.Code:Client:
Leave Room
Reconnect
Style Changes
*Block User*
Server:
Announce
Disconnect Clients
Style Changes
Save Chat
View Logs
Clear Logs
*Block User*
*Lock User*
you can only block 1 person at a time, same with locking
just right-click a user in the listbox
Blocking: you dont hear the selected person
Locking: nobody hears the selected person
I'll add anything else you guys want me to
you both have great working models. digirev i can't wait to see your final version.
Almost done. :DQuote:
Originally Posted by minidesigner
Will be a huge improvement over the first one.
are you going to put my chat logging system in you new release?
Yeah I liked your logging feature so I'll put that in there also. :)Quote:
Originally Posted by Philly0494
If anyone has any more ideas, now is the time to let me know. It's getting pretty close to being done.
you guys can take this, but im not gonna bother making any more since digirev will do a much better job when he finishes hisCode:Client:
Leave Room
Reconnect
Style Changes
Block User
*Block User Management (Max 3)*
Server:
Announce
Disconnect Clients
Style Changes
Save Chat
View Logs
Clear Logs
Block User
Lock User
*Block User Management (Max 3)*
*Lock User Management (Max 3)*
Here is my latest I haven't finished everything (no where near going to add a few more features) There are some options in the context menu that are actually not in use yet (Ignore, Global Mute) You will notice under the console I added a 'unban' 'restart server' and 'shutdown server' feature as well as another lstbox with the user names... will finish it up tomorrow and probably work on more features.... let me know what you guys think! Can't wait to see yours digi!
Nice one Genovah. Can you add a PM feature server/client? Great effort dude!
Thank you! I will work on private messaging once I get these other features nailed down.Quote:
Originally Posted by zynder
Currently I am having a problem with m Global Mute feature its not saving/loading properly perhaps someone could shed some light on where I messed up? I might not be able to find it for the fact that I'm extremely tired and maybe it will be easier later but here it is:
ModChat Code:
Option Explicit 'Structure to store info about a user. 'Add your own stuff if you want. Public Type CHAT_USER strNickname As String 'Nickname. strIP As String 'IP address. strBuffer As String 'Received data buffer from this client. 'Add your own stuff like: 'strRoomName As String 'For multiple rooms. 'strTimeConnected As String 'To store what time they connected? 'All code in the server is based off the info stored here. End Type 'An array that contains all info about every user. 'A user's index in this array corresponds to the Winsock control responsible for this connection. Public udtUsers() As CHAT_USER 'Max integer value, therefore, max simultaneous connections. '(Most computers can't handle anywhere near this many). Public Const MAX_INT As Integer = 32767 'One main sub that closes the server. 'Should be called before opening the server. Public Sub CloseServer() 'Steps: '------ '1. Unload & close all Winsock controls. '2. Erase udtUsers() array to clear up memory. Dim intLoop As Integer With frmChat .sckServer(0).Close 'Close first control. If .sckServer.UBound > 0 Then 'More than one Winsock control in the array. 'Loop through and close/unload all of them. For intLoop = 1 To .sckServer.UBound .sckServer(intLoop).Close Unload .sckServer(intLoop) Next intLoop End If End With 'Erase all current users from memory. Erase udtUsers End Sub 'Finds an available Winsock control to use for an incoming connection. 'You can just copy/paste this code into your chat program if you want. 'Just change "sckServer" to the name of your Winsock control (array). 'And change MAX_INT to max simultaneous connections that you want (it is at top of this module). Public Function NextOpenSocket() As Integer Dim intLoop As Integer, intFound As Integer With frmChat 'First, see if there is only one Winsock control. If .sckServer.UBound = 0 Then 'Just load #1. Load .sckServer(1) .sckServer(1).Close NextOpenSocket = 1 Else 'There is more than 1. 'Loop through all of them to find one not being used. 'If it is not being used, it's state will = sckClosed (no connections). For intLoop = 1 To .sckServer.UBound If .sckServer(intLoop).State = sckClosed Then 'Found one not being used. intFound = intLoop Exit For End If Next intLoop 'Check if we found one. If intFound > 0 Then NextOpenSocket = intFound Else 'Didn't find one. 'Load a new one. 'Unless we reached MAX_INT 'which is max number of clients. If .sckServer.UBound + 1 < MAX_INT Then 'There is room for another one. intFound = .sckServer.UBound + 1 Load .sckServer(intFound) .sckServer(intFound).Close NextOpenSocket = intFound Else 'Server is full! Debug.Print "CONNECTION REJECTED! MAX CLIENTS (" & MAX_INT & ") REACHED!" End If End If End If End With End Function 'Returns the upper bounds (UBound) of udtUsers array without an error. Public Function UBUsers() As Long On Error GoTo ErrorHandler UBUsers = UBound(udtUsers) Exit Function ErrorHandler: End Function 'ignore a user. Public Sub GlobalMuteUser(ByRef Username As String, Switch As Integer) Dim l As Long, u As Long Dim s As String, strPacket As String Dim r As Long ' On Error GoTo ErrorHandler If Username = "" Then Exit Sub s = LCase$(Username) u = UBUsers If Switch = 1 Then For l = 0 To u If LCase$(udtUsers(l).strNickname) = s Then GlobalMute_Add udtUsers(l).strIP Mute_Save udtUsers(l).strIP, 1 r = l Exit For End If Next l AddStatusMessage frmChat.rtbChat, RGB(128, 0, 0), Username & " was muted." Else For l = 0 To u If LCase$(udtUsers(l).strNickname) = s Then GlobalMute_Add udtUsers(1).strIP Mute_Save udtUsers(l).strIP, 0 r = l Exit For End If Next l AddStatusMessage frmChat.rtbChat, RGB(128, 0, 0), Username & " was un-muted." End If ErrorHandler: End Sub Public Sub KickUser(ByRef Username As String) Dim l As Long, u As Long Dim s As String, strPacket As String Dim r As Long On Error GoTo ErrorHandler If Username = "" Then Exit Sub s = LCase$(Username) u = UBUsers For l = 0 To u If LCase$(udtUsers(l).strNickname) = s Then strPacket = "KIK" & Chr$(2) & udtUsers(1).strNickname & Chr$(4) r = l End If Next l If Len(strPacket) > 0 Then SendGlobalData strPacket frmChat.sckServer_Close CInt(r) AddStatusMessage frmChat.rtbChat, RGB(128, 0, 0), Username & " was kicked." End If ErrorHandler: End Sub
I am having problems in the Muted_Save portion of the code. The code is truncated so it could fit. Thanks for any help in advance!ModServer Code:
Option Explicit Public strMuted() As String Public bolRestart As Boolean Public Sub Mute_Save(ByRef IPAddress As String, Switch As Integer) Dim intFF As Integer, l As Long, u As Long Dim sNextLine As String intFF = FreeFile 'On Error Resume Next 'Kill App.Path & "\muted.txt" 'On Error GoTo ErrorHandler If Switch = 1 Then u = Mute_Ubound If u > -1 Then Open App.Path & "\muted.txt" For Append As #intFF For l = 0 To u If Len(strMuted(l)) > 0 Then If l < u Then Print #intFF, strMuted(l) Else Print #intFF, strMuted(l); End If End If Next l Close #intFF End If Exit Sub ElseIf Switch = 0 Then u = Mute_Ubound ReDim Preserve strMuted(0 To u) If u > -1 Then Open App.Path & "\muted.txt" For Input As #intFF Erase strMuted Do Until EOF(intFF) Line Input #intFF, sNextLine If Not sNextLine = "" Then If Not sNextLine = IPAddress Then strMuted(l) = sNextLine Else strMuted(l) = vbNullString End If End If l = l + 1 Loop Close #intFF Open App.Path & "\muted.txt" For Output As #intFF Print #intFF, vbNullString Close #intFF Open App.Path & "\muted.txt" For Append As #intFF For l = 0 To u If Len(strMuted(l)) > 0 Then If l < u Then If Not IPAddress = strMuted(l) Then Print #intFF, strMuted(l) Else If Not IPAddress = strMuted(l) Then Print #intFF, strMuted(l) End If End If Next l Close #intFF End If End If ErrorHandler: Close #intFF Exit Sub End Sub Public Sub Mute_Load() Dim intFF As Integer intFF = FreeFile Erase strMuted On Error GoTo ErrorHandler Open App.Path & "\muted.txt" For Input As #intFF If LOF(intFF) > 0 Then strMuted = Split(Input(LOF(intFF), intFF), vbCrLf) Close #intFF Exit Sub ErrorHandler: Close #intFF Exit Sub End Sub Public Sub GlobalMute_Add(ByRef IPAddress As String) Dim u As Long u = Mute_Ubound + 1 ReDim Preserve strMuted(0 To u) As String strMuted(u) = IPAddress End Sub Public Function GlobalMute_IsMuted(ByRef IPAddress As String) As Boolean Dim l As Long, u As Long u = Mute_Ubound If u > -1 Then For l = 0 To u If strMuted(l) = IPAddress Then GlobalMute_IsMuted = True Exit For End If Next l End If End Function Public Function Mute_Ubound() As Long On Error GoTo ErrorHandler Mute_Ubound = UBound(strMuted) Exit Function ErrorHandler: Mute_Ubound = -1 Exit Function End Function
first off explain what mute is to be used for
It prevents the user from speaking what so ever by calling upon a sub to check and see if the user has been added to the mute list the problem is in the Mute_Save sub
Below this line of code: If switch = 0 then where muted.txt is input into the string sNextLine
sNextLine = strMuted(l) should put the text into the proper string but I get a subscript error. not sure why seeing as the dimensions are set properly as far as I can tell... but as I said earlier maybe its lack of sleep... off to take a nap
*edit* Fixed... I accidently put an Erase string in by mistake
Genovah, you should really convert to a database instead of usng text files. it reduces code by a lot =)
I agree but the coding I have done with databases has all been in PHP/SQL... So my knowledge is limited seeing as I didn't do it too much... However if I were to go to a database setup wouldn't the server have to be running Microsoft SQL or another type of database? I am trying to make a server that can be run by any user with minimal to no set up required... once I scratch the public version and make my own I will definetly learn/convert it to DB format
You can use microsoft access database .mdb files and the querys are the same as if you was using mySQL for the most part so its pretty simple to pick up. If you need an example. i'll post one =)
As long as you don't mind I would be interested in seeing an example
http://www.vbforums.com/showthread.php?p=3228114 MULTI-USER WINSOCK CHAT USING ACCESS DATABASE
I once tried to build a chatting system from scratch with databases...
I gave up :D
But that's quite usually the thing that happens when I start with things from scratch, due to lack of time/patience/coffee and the overflow of laziness/practical problems/the application.
Anyways,
@psych; that interface looks so familiar, but I don't remember where from...
After reviewing the code and looking at everything I think I am going to go with an access database will make it easier to store all the colors and everything else. Thanks psycho! it was a great idea! BTW do you have groove or another type of messanging service? I would like to add you as a friend if you don't mind.Quote:
Originally Posted by psychotomus
DB not installed yet but PM feature is complete
Note: ignore is not fully functional on the client side yet
Here are a few spoiler screenshots in case you are wondering what it looks like so far...
http://www.vbforums.com/attachment.p...8&d=1211022707
http://www.vbforums.com/attachment.p...9&d=1211022711
http://www.vbforums.com/attachment.p...0&d=1211022714
http://www.vbforums.com/attachment.p...1&d=1211022717
http://www.vbforums.com/attachment.p...2&d=1211022721
I have it setup so you can create different "server configurations" with different room lists and settings and load them right from the Server menu so you don't have to set it up every time.
Wow Digi and I thought I was getting somewhere.... *bows to DigiRev*
Good job can't wait to start parsing your code! :P
Are you using a db format or standard .txt files with VB Chat?
I wanted this to be kind of like mIRC without people having to sign up so there is no db or anything.
Maybe after I release this one I'll make an IM version...
Will post more screenshots soon. File transfers are being a *****
Makes sense to me! Thats kind of what I was going for but then after implementing an admin feature I figure I would be best off going with a db instead of multiple strings identifying admins vs moderators vs regular clients
Wow that is pretty cool, how did you get the rounded frames in vb 6?Quote:
Originally Posted by DigiRev
PS: How did you ever get ti so people could change their username color?
Those are normal frames. I'm just using a manifest file for XP style. ;)Quote:
Originally Posted by Justin M
I sent the color along with the nickname when they login. And store this color in the CLIENT UDT on the server side.
When the server relays a chat message to the room, it also sends this color from that user's UDT.
Then I updated the procedure that shows a chat message to set the color of the username to this value.
Sorry, that's the best I can explain it. This thing should be done pretty soon and you can see.