AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TCP/IP Server+Client Chat Script (w/ Features)
Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  

Would you use this script?
Yes
73%
 73%  [ 17 ]
No
8%
 8%  [ 2 ]
Frequently
13%
 13%  [ 3 ]
Maybe once or Twice
4%
 4%  [ 1 ]
Total Votes : 23

Author Message
Guest






PostPosted: Sat Jun 07, 2008 4:23 pm    Post subject: Reply with quote

Also, The read only edit control you have on the right (User List) should be a Listbox, that way you could simply select a user's name and click boot, and also by using a Listbox you could work in a context menu (if I'm not mistaken) so you could right click a users name for options like an IRC client.
Smile
Back to top
jmanx



Joined: 14 May 2008
Posts: 48

PostPosted: Sun Jun 08, 2008 1:46 am    Post subject: Reply with quote

When I use my server all the clients are already compiled so I dont have to worry about that problem, but it wouldn't be hard for the server to decline messages that are redundant.

When you talk in the client it goes like so

Message "hi" sent to server
Server reads message and logs it
Server sends message "hi" back to you and all other clients.

With this routine, I can easily make it decline any SR1 or RX2 messages since the server sends those to the clients, not clients to server. I can also make it so messages coming in that DO NOT have a client name from the user list attached will be ignored. Also since you cannot use the same nickname as someone else, if the server receives any connected or disconnected messages from someone who IS or ISN'T on the userlist, will be ignored.

The Listbox idea doesn't sound bad.
Going to wait till I'm in a better mood to fix those details.

The only one I can think of that would be somewhat difficult to prevent is someone removing the kicking feature to dodge a kick.



EDIT: Decided not to finish this cause the server was conflicting when it would receive messages that it was intending to block. I guess I could try a way around that but I remember that the source is posted here to display all the functions and should be compiled before distribution. (if that be intended)


Last edited by jmanx on Thu Jun 12, 2008 6:04 am; edited 1 time in total
Back to top
View user's profile Send private message
NLI-C
Guest





PostPosted: Sun Jun 08, 2008 10:51 pm    Post subject: Reply with quote

Quote:
The only one I can think of that would be somewhat difficult to prevent is someone removing the kicking feature to dodge a kick.

Maybe you should add an "Unvoice" feature, where the user could still read the chat but the server would not distribute the user's messages.

A safe method could be used for kicking, if the the server could have a list of all "Accepted Users", and when a user is "kicked" he or she is removed from the "Accepted Users" list, so the server will not distribute the user's messages and will not send other user's messages to the person.

Hope you understood that. I don't really know how to explain it that well.

What theme are you using?!?!? lol
Back to top
Repkam09



Joined: 11 Feb 2008
Posts: 7
Location: USA

PostPosted: Sun Jun 08, 2008 11:49 pm    Post subject: wow! Reply with quote

very cool!

and for the reoccurring question: what theme is that Shocked
_________________
[repkam09]
AHK Beginner Razz
Back to top
View user's profile Send private message AIM Address
jmanx



Joined: 14 May 2008
Posts: 48

PostPosted: Mon Jun 09, 2008 2:08 am    Post subject: Reply with quote

I get what your saying with the allowed list and it would be a safe feature to add to the server side to not allow kicked users to talk. This would be a good defense against people removing the kick function from their script.

I guess in addition with that, everytime a user connects they would be added to the list and vice versa when they disconnect.
Back to top
View user's profile Send private message
Guest






PostPosted: Wed Jun 11, 2008 11:47 pm    Post subject: Reply with quote

so um.......



WHAT THEME




Wink
Back to top
jmanx



Joined: 14 May 2008
Posts: 48

PostPosted: Wed Jun 11, 2008 11:54 pm    Post subject: Reply with quote

It's a Windows Blinds skin I made.
Back to top
View user's profile Send private message
Slanter



Joined: 28 May 2008
Posts: 397
Location: Minnesota, USA

PostPosted: Thu Jun 12, 2008 4:36 am    Post subject: Reply with quote

Awesome script

One suggestion, rather than using direct paths like "C:\WINDOWS\system32\narrator.exe" you should use "%A_WinDir%\system32\narrator.exe". I had to change that in the script before it would work, because my windows directory is at C:\WINNT\
Back to top
View user's profile Send private message Visit poster's website
jmanx



Joined: 14 May 2008
Posts: 48

PostPosted: Thu Jun 12, 2008 5:42 am    Post subject: Reply with quote

fixed, thanks for pointing that out


also all the %a_desktop%s have been changed to %A_Windir%
Just to keep the txts out of your hair on the desktop
Back to top
View user's profile Send private message
n-l-i-d
Guest





PostPosted: Thu Jun 12, 2008 11:19 am    Post subject: Reply with quote

Nice script.. but an urgent "suggestion": get rid of these paths alltogether:

C:\clientinfo.ini
C:\pinger.bat
C:\Pinglog.txt
%A_WinDir%\1.txt
%A_WinDir%\2.txt
%A_Windir%\i2l.txt
%A_Windir%\client.txt
%A_Windir%\userlistc.txt
%A_Windir%\usernamestemp.txt
%A_Windir%\server.txt
%A_Windir%\usertemp.txt

etc., and replace them with paths to A_ScriptDir (or a tmp folder in your script directory, or the real TEMP directory). It is very sloppy to place your files in the system directories (where you place them now), they simply don't belong there, because they have nothing to do with your system nor your root-directory.
Back to top
Fry



Joined: 01 Nov 2007
Posts: 689

PostPosted: Thu Jun 12, 2008 7:20 pm    Post subject: Reply with quote

@n-l-i-d

I think the files should stay in the current directories

Its not in the way of the user, as was when they were on the Desktop.

If they were put in the temp directory they might get deleted by a full history clear or another program, such as CCleaner.
This would cause problems with the Chat Script.

The root directory should not even be mentioned in your post.
As the root directory is just not where user folders are, its like another desktop.

I see your argument about system directory, but with the root directory it is unnecessary.
_________________
check out my site
www.eliteknifesquad.com


Last edited by Fry on Thu Jun 12, 2008 8:48 pm; edited 1 time in total
Back to top
View user's profile Send private message
jmanx



Joined: 14 May 2008
Posts: 48

PostPosted: Thu Jun 12, 2008 8:14 pm    Post subject: Reply with quote

I see both your points and what I could do is write a temporary directory IN the win directory. This way, it's kept all together but still aside.

However, C:\clientinfo.ini needs to stay where it's at being as it's not just a temporary file.
Back to top
View user's profile Send private message
n-l-i-d
Guest





PostPosted: Thu Jun 12, 2008 8:39 pm    Post subject: Reply with quote

Again, why use the Windows system directory, if the program is not related to a system function? Some users will run into permissions problems with this anyway. You can simply put your script in a folder with a temp subfolder for the files you overwrite, and put the permanent file in the same "root" folder with the script.

C:/path/to/your/script/folder/script.ahk
C:/path/to/your/script/folder/permanent.txt
C:/path/to/your/script/folder/temp/temporary1.txt
C:/path/to/your/script/folder/temp/temporary2.txt
etc.

This way, if the user removes the script-folder, all related files will be removed too (and there will be no junk files left in the system folder)
Back to top
Fry



Joined: 01 Nov 2007
Posts: 689

PostPosted: Thu Jun 12, 2008 8:47 pm    Post subject: Reply with quote

@n-l-i-d

jmanx just stated he will make a temporary file IN the win directory, which will most likely be deleted when the script is exitd , which fixes the junk files problem.

Also why does this concern you so much?
It does not harm you in anyway, so why care about it?


@jmanx I was agaisnt n-l-i-d, sorry for the confusion
Also your chat server is down, get it back up

_________________
check out my site
www.eliteknifesquad.com
Back to top
View user's profile Send private message
n-l-i-d
Guest





PostPosted: Thu Jun 12, 2008 8:54 pm    Post subject: Reply with quote

Laughing

Well, it really doesn't matter that much, but - I feel - it's cleaner and more user friendly.

And, if the script fails to delete the files in the system directory, it might be hard to get rid of them (distinguish them from the "real" system files). Nobody likes a clogged (and slow) system. Isn't that why you use CCleaner in the first place? Wink
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 2 of 6

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group