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, 7, 8, 9
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  

Would you use this script?
Yes
72%
 72%  [ 24 ]
No
9%
 9%  [ 3 ]
Frequently
9%
 9%  [ 3 ]
Maybe once or Twice
9%
 9%  [ 3 ]
Total Votes : 33

Author Message
Reggie88



Joined: 04 Mar 2010
Posts: 5

PostPosted: Thu Mar 04, 2010 7:38 am    Post subject: cool Reply with quote

Nice mod WankaUSR:)

The only think that buged me was when a user logon, he comes up two times on the list, when he log off the server only remove one of the name on the list, and when he logon agian the server adds two new names.
It just keep stacking up till he gets the message that the user is already in use.

I discoverd that it had something to do whit Userlist.txt that keep on remebering the names and keep typeing them in when a user logon. I could even type in a random word and it pop up:P

So i removed this part from the code and the problem disappeard:)
Code:
fileappend, %recievedx1%`n, Settings\userlist.txt
fileread, userlist, Settings\userlist.txt


Donno if it was the right move since im still a new student at programing, but hope you can look in to it:)
Back to top
View user's profile Send private message
WankaUSR



Joined: 14 Aug 2007
Posts: 86

PostPosted: Fri Mar 05, 2010 6:43 am    Post subject: Reply with quote

ok that was something I did not see when testing when fixing that I found another bug it also doesn't make the difference between already logoned users . I will look into this
Back to top
View user's profile Send private message Visit poster's website
Rock-um
Guest





PostPosted: Tue Mar 09, 2010 3:12 am    Post subject: Reply with quote

I still see the same strange outgoing text. It obviously works, but there is "extra" redundant text being sent from the server (and maybe the client too). I logged into the server using putty and here is the conversation color-coded for clarity.

Client Sent Text = Red
Server Sent Text = Green

______________________________________________

Joe Connected!
Hello
Joe: Hello
How are you?
Joe: Fine thank you, how are you?
Fine

______________________________________________

However this is what Putty reports as the incoming and outgoing text

______________________________________________

RX2CLIENTCON:Joe Connected!
HelloENTCON:elloENTCON:Joe: Hello
How are you?ow are you?Joe: Fine thank you, how are you?
Finere you?inere you?

______________________________________________

So why is "ENTCON:elloENTCON:" and "ow are you?" and "re you?inere you?"being sent?

By the way this is not new to WankaUSR's code it has been there since the start. It obviously works, but is there anyway to eliminate the junk text? Thanks WankaUSR, jmanx and others
Back to top
rockum



Joined: 20 Dec 2007
Posts: 22

PostPosted: Wed Mar 17, 2010 2:37 am    Post subject: Reply with quote

bumpidy bump
Back to top
View user's profile Send private message
Zaelia



Joined: 31 Oct 2008
Posts: 604
Location: France

PostPosted: Mon Apr 19, 2010 4:51 pm    Post subject: Reply with quote

Sorry I need to understand this script, if you can help me Smile

For kick an user this code is beter ?
DllCall("Ws2_32\closesocket" , "UInt", conectioncheck%a_index%)
or perhaps Ws2_32\shutdown

And about DllCall("Ws2_32\WSACleanup") they send a message to server for free socket or socket is always use after a crash client ?
( if ReceivedDataLength = 0 )
Back to top
View user's profile Send private message Send e-mail
ddk_
Guest





PostPosted: Mon Apr 19, 2010 7:53 pm    Post subject: Reply with quote

Hmm.. Could someone explain me how is the userlist thing done? How does the server know that someone connected and how does it get the nick? Smile
Back to top
Zaelia



Joined: 31 Oct 2008
Posts: 604
Location: France

PostPosted: Fri Apr 23, 2010 12:15 pm    Post subject: Reply with quote

I have found a bug on my computer, it's about SendData() :

VarSetCapacity(SendData) must be replace by StrLen(SendData) for to have the real lenght, it's seems that return of VarSetCapacity "bug" for this use, normal it's a String.

With StrLen, the size of data (that we send) don't grow and are true... Sorry it's hard to explain it, you can view it with ressource system or a msgbox.
Back to top
View user's profile Send private message Send e-mail
mr. mooyeah
Guest





PostPosted: Mon Dec 19, 2011 4:33 pm    Post subject: Reply with quote

make a video streaming of webcams if its possible Very Happy
Back to top
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9
Page 9 of 9

 
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