Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 12th, 2006, 12:56 PM   #1
clyde
Newbie
 
Join Date: Mar 2006
Posts: 1
Rep Power: 0 clyde is on a distinguished road
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.
clyde is offline   Reply With Quote
Old Mar 22nd, 2006, 12:12 PM   #2
bgeraghty
Newbie
 
Join Date: Mar 2006
Posts: 15
Rep Power: 0 bgeraghty is on a distinguished road
Thats not delphi.
bgeraghty is offline   Reply With Quote
Old Mar 22nd, 2006, 12:30 PM   #3
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
This is not Delphi, and could you please use code tags? It's like unreadable in this way.
Polyphemus_ is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:07 AM.

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