New Member!!
New Member!!
New Member!!
New Member!!
New Member!!
New Member!! New Member!! New Member!! New Member!! New Member!! New Member!! New Member!! New Member!!
New Member!! New Member!!
New Member!!
Go Back  Xtreme Visual Basic Talk > > > New Member!!


Reply
 
Thread Tools Display Modes
  #1  
Old 04-07-2009, 08:37 AM
bl4ck0ut bl4ck0ut is offline
Newcomer
 
Join Date: Jan 2009
Posts: 8
Default New Member!!


Hello all, I am a relatively new member here my first post and all. Somewhat novice in the area of Visual Basic, I was wondering if I could get some help on a project I'm currently working on. I would like to have a one-on-one conversation about the specifics of the problem. If anyone here wants to help a beginner please reply to this thread.

It is an IRC connectivity problem, FYI:

If InStr(StrCMD(0), ":" & Master & "!") Then

What does that mean exactly??

Last edited by bl4ck0ut; 04-07-2009 at 10:01 AM.
Reply With Quote
  #2  
Old 04-07-2009, 10:13 AM
Qua's Avatar
QuaNew Member!! Qua is offline
Impetuous & volatile

* Expert *
 
Join Date: Apr 2005
Posts: 2,177
Default

Perhaps you should be a bit more specific as to what your problem concerns and having a public discussions is often more constructive as you can get input from several sources and views upon the matter.
__________________
Reading is the foundation for all knowledge - Unknown.
Reply With Quote
  #3  
Old 04-07-2009, 10:18 AM
bl4ck0ut bl4ck0ut is offline
Newcomer
 
Join Date: Jan 2009
Posts: 8
Default

Very true indeed. So far I've kept this project to myself, (private) but as I mentioned previously there are a few bits of common code I'm not fully understanding and here they are:

If InStr(Data, ":?") Then
StrCMD = Split(Data, ":?")
Command = StrCMD(1)
Words() = Split(Command, " ")
End If

If InStr(StrCMD(0), ":" & Master & "!") Then


If InStr(Command, "start")



Running a command through IRC, (I know what it sounds like) I cannot figure our this basic function. I'm looking for the character to initialize the command. All help is appreciated.
Reply With Quote
  #4  
Old 04-07-2009, 10:47 AM
webbone's Avatar
webbone webbone is offline
Hydrogen Powered

Administrator
* Expert *
 
Join Date: Jul 2003
Location: Sacramento, CA
Posts: 6,090
Default

It sounds like you are using code you just 'found somewhere' - which is always a problem since unless it is well documented you will frequently have trouble understanding WHAT it does!

Have you done a Google search for documentation of the IRC command structure? Not only would that answer your question but would probably also help you to decipher this code you are using.
__________________
"With the appearance of the AddressOf operator, an entire industry has developed among authors illustrating how to do previously impossible tasks using Visual Basic. Another industry is rapidly developing among consultants helping users who have gotten into trouble attempting these tasks." -Dan Appleman
Reply With Quote
  #5  
Old 04-07-2009, 10:59 AM
bl4ck0ut bl4ck0ut is offline
Newcomer
 
Join Date: Jan 2009
Posts: 8
Default

Thanks for the response! Yes google is my friend, I found plenty of documents that explain the in's and out's of IRC, I'll read them further. I am not a code kiddie, but yes I do take bits here and there to study I'm in school for Networking and Security. I believe that the answer to my question does in fact ly within the above code.


Words() = Split(Command, " ") <---- I think a character must be entered here, something like an exclamation mark between the quotes.

I will continue to google and thank you for some help. So please keep replying, the appreciation I have for the help is beyond substantial.
Reply With Quote
  #6  
Old 04-07-2009, 11:06 AM
Qua's Avatar
QuaNew Member!! Qua is offline
Impetuous & volatile

* Expert *
 
Join Date: Apr 2005
Posts: 2,177
Default

Quote:
Originally Posted by bl4ck0ut View Post
Thanks for the response! Yes google is my friend, I found plenty of documents that explain the in's and out's of IRC, I'll read them further. I am not a code kiddie, but yes I do take bits here and there to study I'm in school for Networking and Security. I believe that the answer to my question does in fact ly within the above code.


Words() = Split(Command, " ") <---- I think a character must be entered here, something like an exclamation mark between the quotes.

I will continue to google and thank you for some help. So please keep replying, the appreciation I have for the help is beyond substantial.
The Split() function takes a string, command in this case, and splits it into a substring everytime it encounters the delimiter in the string, in this case a space " ". If you had the string My Car Is Red contained inside Command it would be split into My, Car, Is and Red
__________________
Reading is the foundation for all knowledge - Unknown.
Reply With Quote
  #7  
Old 04-07-2009, 11:14 AM
bl4ck0ut bl4ck0ut is offline
Newcomer
 
Join Date: Jan 2009
Posts: 8
Default

Ok great I didn't know that before thank you! So the quotation marks are not significant?
Reply With Quote
  #8  
Old 04-07-2009, 12:39 PM
Qua's Avatar
QuaNew Member!! Qua is offline
Impetuous & volatile

* Expert *
 
Join Date: Apr 2005
Posts: 2,177
Default

Quotation marks are used when you want to create a new string object with the inside of the marks being the value of the string.
__________________
Reading is the foundation for all knowledge - Unknown.
Reply With Quote
  #9  
Old 04-08-2009, 07:14 AM
bl4ck0ut bl4ck0ut is offline
Newcomer
 
Join Date: Jan 2009
Posts: 8
Default Thanks

So if I understand correctly, while being in an IRC chan the Command would be anything with a defined character in front of the word is recognized by the value of the string?
And also the following line intrigued me:

If InStr(StrCMD(0), ":" & Master & "!") Then


The values here threw me off, any thoughts please?
Reply With Quote
  #10  
Old 04-08-2009, 11:46 AM
Qua's Avatar
QuaNew Member!! Qua is offline
Impetuous & volatile

* Expert *
 
Join Date: Apr 2005
Posts: 2,177
Default

I suggest you go read up on the IRC protocol like webbone suggested. Without knowing the protocol for communication you'll be rather lost since you can't logically deduce the meaning of the syntax and commands. For example, when a peer joins a channel you'll recieve a message in the following format:
Code:
:NICK!xxxxx@00.00.00.00 JOIN #CHANNELNAME
Without knowing the exact syntax you'll have no way of parsing all the different messages you'll recieve during a session.
__________________
Reading is the foundation for all knowledge - Unknown.
Reply With Quote
  #11  
Old 04-08-2009, 12:37 PM
bl4ck0ut bl4ck0ut is offline
Newcomer
 
Join Date: Jan 2009
Posts: 8
Default

You are absolutely correct and thank you for teaching me this. Unfortunately it is not so much specifically IRC commands, those are basically anything with a /WHATEVER. So when my program is compiled and run I do in fact see it join the channel, yet have been unable to figure out what needs to be typed into the IRC textbox in order for commands to execute. The answer is in the code, it has to be (I believe). Then again I'm only a student and VB is relatively new to me. Help is greatly appreciated. Thank you!

Last edited by bl4ck0ut; 04-08-2009 at 03:14 PM.
Reply With Quote
Reply


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 Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
New Member!!
New Member!!
New Member!! New Member!!
New Member!!
New Member!!
New Member!! New Member!! New Member!! New Member!! New Member!! New Member!! New Member!!
New Member!!
New Member!!
 
New Member!!
New Member!!
 
-->