This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

catch

Old posts that have not been replied to for several years.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

catch

Post by caesar »

I would like some tips on how to catch an notice sent to the eggdrop in a variable. I've tryed the 'catch' thing like this:

bind notc - * ch:catch

proc ch:catch {nick host handle text dest} {
set notice [catch $text]
putserv "PRIVMSG #chan :Notice: $notice"
}

And the reply is: 'Notice: 1' when should be the notice that he recived. Eg. when I send a notice like this: 'this is an notice' it awlays reply: 'Notice 1' instead 'Notice: this is an notice'. I'm I missing something?
Once the game is over, the king and the pawn go back in the same box.
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Re: catch

Post by egghead »

caesar wrote: [snip]
set notice [catch $text]
What is the catch for? Read up in tcl documentation what "catch" does. Have you tried "set notice $text"?
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Humm.. I think I'm dumb or something.. Lost my minds.. seesh.
Once the game is over, the king and the pawn go back in the same box.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Ok. It recives some notices from X and should process them in some variables.

Eg.:

For an request of channel satus he will recive something like this:
Channel #chan has 3 users
bla bla bla
...
Auth: Foo/Bar [100] .. Bar/ [100] ..

Foo/Bar [100] = Nick/user [access]
Bar/ [100] = user/ [access]

So, I wanted them in a variable so I can split this later in the proc. So, I needed something like 'catch' to make them in different variables for later use.

Humm.. I think I found the solution for this also.. damn, I think, I mean I'm shure I've lost my minds somewhere..
Once the game is over, the king and the pawn go back in the same box.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

bind notc - "*USER*" x:user

proc x:user {nick host handle text dest} {
set who [lindex [split $text ":"] 0]
putlog "$who"
}

Is not working and I don't have a clue why this happens. he recives the notice but dosen't proces it. Also, the sctipt is loaded and on a .binds here is the result: 'notc -|- *USER* 3 x:user' so, is loaded.

Also, this one works:

bind notc - "Auth*" x:auth

proc x:auth {nick host handle text dest} {
putserv "PRIVMSG #chan :Auth: $text"
return }

and betwen them there is no notable difference. I'm I missing something?
Once the game is over, the king and the pawn go back in the same box.
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Post by egghead »

caesar wrote:bind notc - "*USER*" x:user

proc x:user {nick host handle text dest} {
set who [lindex [split $text ":"] 0]
putlog "$who"
}

Is not working...
[snip]
Works fine with me. Are you sure your console displays the putlogs?
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

What you mean? I also moved it to a channel and still nothing.
Once the game is over, the king and the pawn go back in the same box.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Seesh.. Funny thing. I've renamed the proc and seems to be working. and NO I don't have any other proc with that name or a unbind for it.
Once the game is over, the king and the pawn go back in the same box.
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

its the bots fault, eggheads fault, robey's fault, and the guy who made tickle :)))))
photon?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

It's pronouced tickle, not spelt it.
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

heheheh i know >:-<
photon?
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

and btw ppslim, i can spellcheck all your posts and post the correct spellings if you would like. you are a rapist of the english language!

:)
photon?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

OH, I was never aware this forum was due for examination board review. Nor did I know that every spelling mistake, error in grammar and punctuation, would be inspected, reviewed and commanted on.

And I certainly don't need sarcasm to tell me I failed at Enlglish in school. Yes, I failed, and frankly, I don't care.

Dyslexia.

There are two types of people in this world.

Pricks, and non-pricks. I will give you two guesses which one I place you in, though you won't need them.

Pricks come in further sub-catagories, and one of the worst ones, are "Turned up nose" types. These are the type of people, that have to put others down, on small points, unrelevant to the topic of conversation.

Further more, they have a tendancy to feel dumb later on for making such comments.

Yes, as noted above, I suffer from Dyslexia. This has caused me major hastle in my quest for employment, as to an employer, it isn't a condition/disability.

They judge a person on the enscribed markings of a peice of paper. A scottish £1 note has more value, than the production and printing costs of that paper, but it seems to make people much richer, through employment.

When I was informed I suffered from a form of Dyslexia, I was given advice from the special needs teacher, which I still follow to this day. If a condition like mine, will cause me to struggle in a certain area of development, ignore it.

And that is what I did. I failed English and IT because of it,a nd it doesn't bother me. I also failed other computer courses. Just because I did this, it doesn't meen I didn't gain anything. I gained more from what I did study while refusing to do the other stuff, that I would if I had followed enlish and IT.

Amstrad Basic, Quick Basic, Tcl, HTML, DHTML, XHTML, PHP, Perl, Javascript, IP numbering structure, Profesional Photography, Porfesional printing, Spot colour and CYMK.

The Internet is about free speech, not about putting people down, even more so, when you don't knwo what you are talking about.

How could I have simplified this message?

I couldn't give a D*** what you think about my spelling.

However, I do have to ask the question. Why the hell does it matter that I can't spell? What catagory would you place yourself in?
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

i should mention it was merely a joke, no harm intented.
im sorry you think im a prick.
sorry about your dyslexia aswell though you seem to get along quite nicely.

i dont feel dumb, rather misunderstood.
photon?
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Post by egghead »

spock wrote:i should mention it was merely a joke, no harm intented.
[snip]
Spock, even though I'm aware of ppslim's dyslexia, I appreciated and parsed your comment as a good joke. :) It's kind of unfortunate ppslim parsed it differently.
Next time you meet him, buy him a tequila and things will be allright! :wink:
Locked