Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Delphi (http://www.programmingforums.org/forum41.html)
-   -   Chat Plugin (http://www.programmingforums.org/showthread.php?t=8824)

clyde Mar 12th, 2006 12:56 PM

Chat Plugin
 
hello,
i'm new to programming and i ran into a problem.

i am making a "admin" plugin for a chat what happens is when it connects it connects as a ghost socket.
i need the plugin to appear as an actually person has entered the room "so users can pm it to login", so would i loop the serversocket? or would all this be in properties?

i'm lost any help would be greatly appreciated..

admin code snippet:

Dim strdata as string
Dim AresTxt as string
Dim NickName as string
Dim DataType as string
Dim OutPutNextData as Boolean
Dim NextdataType as string
Dim TempData as string
strdata = ServerSock.ReadAll(encodings.utf8)
strdata = RightB(strdata,LenB(strdata)-3)
AresTxt = Right(strdata,Len(strdata)-Instr(1,strdata,chr(&h0)))
NickName = Left(strdata,Instr(1,strdata,chr(&h0))-1)
DataType = Mid(strdata,3,1)
TempData = strdata

ChatScreen.text=ChatScreen.Text+NickName+">"+AresTxt+endofline

Dim K1 as string
Dim K2 as string
Dim K3 as string
Dim K4 as string
Dim K5 as string
K2 =Mid(arestxt,6)
K1 = Mid(arestxt,7)
K3 = Mid(arestxt,9)
K4 = Mid(arestxt,11)
K5 = Mid(arestxt,8)
tobekicked.text=K1
if left(arestxt,5)="#kick"then
if NickName = admin1.text then
ServerSock.write chr(&H0)+chr(&HFF)+chr(&h28)+"Clyde"+chr(&H0)+ToBeKicked.Text+chr(&H0) ////works fine cept can't login nor send text thru to chat but does connect as admin////

///2 different plugins////

bot plugin code snippet:

Dim strdata as string
Dim AresTxt as string
Dim DataType as string
Dim OutPutNextData as boolean
Dim NextdataType As string
Dim TempData As string

strdata = ServerSock.readall(encodings.utf8)
strdata = RightB(strdata,LenB(strdata)-3)
DataType = Mid(strdata, 3, 1)
TempData = strdata

Select Case DataType
//////NORMAL CHATROOM MESSAGE\\\\\\\
Case Chr(10)
If Len(strdata) = 0 Then
OutPutNextData = True
NextdataType = DataType

Else

OutPutNextData = False
AresTxt = Replace(strdata, Chr(0), "> ")
End if ////connects fine but as a user not as a admin///

how would i combine the 2 so that i may send messeges to chat thru the admin plugin and have the server socket aware it needs to write that not only has an admin plugin been activated but that the plugin actually entered the room as well.

Admin Socket Connected "" +"" then have it write that
"" has joined sharing"" files.
that is sorta what i am after combining the two.

bgeraghty Mar 22nd, 2006 12:12 PM

Thats not delphi.

Polyphemus_ Mar 22nd, 2006 12:30 PM

This is not Delphi, and could you please use code tags? It's like unreadable in this way.


All times are GMT -5. The time now is 6:46 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC