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.

make bot ctcp anyone

Old posts that have not been replied to for several years.
Locked
User avatar
Dedan
Master
Posts: 260
Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis

make bot ctcp anyone

Post by Dedan »

I have been trying to get the bot to
ctcp a message to a nick for the last 2 hours

I thought this would do it:

putserv "ctcp $nick :newmessage"

so, what is the sceret?

thanks for any help given
I once was an intelligent young man, now i am old and i can not remember who i was.
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Re: make bot ctcp anyone

Post by strikelight »

Dedan wrote:I have been trying to get the bot to
ctcp a message to a nick for the last 2 hours

I thought this would do it:

putserv "ctcp $nick :newmessage"

so, what is the sceret?

thanks for any help given
CTCP's are actually a client program invention (probably mIRC), which are really regular private messages (PRIVMSG's)...

putserv "PRIVMSG $nick :\001<ctcp query>\001"

should do the trick for you.
User avatar
Dedan
Master
Posts: 260
Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis

Post by Dedan »

that's closer ... i am getting something back.

I am trying to add a extra version reply
to the regular one ... i want 2 replies
to be sent to the person who versions the bot.

the problem with the above code is that it
cuts off the 2nd word between the \001 \001's

I get:
[porah VERSION] reply

instead of:
[porah VERSION reply]:

I tried:

putserv "PRIVMSG $nick :\001VERSION reply\001 Addon: BotServ v1.1"

and:

set vreply "VERSION reply"
putserv "PRIVMSG $nick :\001$vreply\001 Addon: BotServ v1.1"


also tryied these, i listed their returns under the script:

putserv "NOTICE $nick :\001VERSION \003reply\001 Addon: BotServ v1.1"
[porah VERSION reply]: reply


putserv "NOTICE $nick :\001VERSION \reply : Addon: BotServ v1.1\001"
[porah VERSION reply]


putserv "NOTICE $nick :\001VERSION \reply\001\001: Addon: BotServ v1.1\001"
[porah VERSION reply]

any ideas?
I once was an intelligent young man, now i am old and i can not remember who i was.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Use PRIVMSG for the CTCP query portion, and NOTICE for the CTCP reply.

The format should be

putserv "NOTICE $nick :\001VERSION Addon: BotServ v1.1\001"

As for the origin of CTCP, nope, this wasn't a mIRC contraption.

It was invented as a method of automating / program a client to relact on somthing, exactly as it does for VERSIon and even DCC.

As such, allmost every script should be written to react through CTCP, however,t hat would be too easy and who follows a standard anyhow.
User avatar
Dedan
Master
Posts: 260
Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis

Post by Dedan »

putserv "NOTICE $nick :\001VERSION Addon: BotServ v1.1\001"
returns
[Zipporah VERSION reply]: Addon: BotServ v1.1

is there anyway to drop the 2nd ":" ?
I once was an intelligent young man, now i am old and i can not remember who i was.
User avatar
Dedan
Master
Posts: 260
Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis

Post by Dedan »

I don't know what i did the first few times
but i got it now ...
thanks for the help ppslim 8)
I once was an intelligent young man, now i am old and i can not remember who i was.
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

ppslim wrote: As for the origin of CTCP, nope, this wasn't a mIRC contraption.

It was invented as a method of automating / program a client to relact on somthing, exactly as it does for VERSIon and even DCC.

As such, allmost every script should be written to react through CTCP, however,t hat would be too easy and who follows a standard anyhow.
It's hard to follow a "standard" when it was never originally standardized in the original RFC's...

When IRC was first created, as you can guess, CTCP wouldn't have even been a concept yet... No real need for it... As such, I suspect it would have been the earliest client program to introduce it, most likely ircII ...

You can tell that it is an after thought, implemented initially by a client program, as it uses 'PRIVMSG' and 'NOTICE' in it's protocol, instead of having it's very own seperate command.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Using PRIVMSG and NOTICE is pretty efficient.

The machanism is allready defined and clients need no changes to support it.

All RFC are only drafts. They are not standards, however, in most cases, they are followed as a official due to the ready available source.

IRC uses a barebones structure and has very few commands. Most of the commands that do exist are for server maintainance or administration.

Adding new commands for CTCP would have been like producing a whole new HTTP protocol just for dealing with encrypted trafic.

Instead, they used an existing layer available, and channeled it over encrypted links instead.
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

ppslim wrote:Using PRIVMSG and NOTICE is pretty efficient.

The machanism is allready defined and clients need no changes to support it.

All RFC are only drafts. They are not standards, however, in most cases, they are followed as a official due to the ready available source.

IRC uses a barebones structure and has very few commands. Most of the commands that do exist are for server maintainance or administration.

Adding new commands for CTCP would have been like producing a whole new HTTP protocol just for dealing with encrypted trafic.

Instead, they used an existing layer available, and channeled it over encrypted links instead.
The point is, it WAS infact added as an after-thought, which you just stated yourself.

QED.
Locked