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.

Who wrote topic

Old posts that have not been replied to for several years.
n
nso
Voice
Posts: 19
Joined: Fri Apr 25, 2003 4:45 pm

Who wrote topic

Post by nso »

How do one go about fetching the nick of the user who set the topic in a given channel?
I have searched all over trying to find such a feature, but I came out short :\

- nso
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

maybe you check the raw reply to the "/topic" command, i think the user who set it and when is in this reply
n
nso
Voice
Posts: 19
Joined: Fri Apr 25, 2003 4:45 pm

Post by nso »

reading the commands in rawformat, does that have to be incorporated pre-compile?
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

sorry, dont understand yer question (my english is rather poor, i'm austrian)..

just get the IRC RFC (dunno the number by hard) and check it out..
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

nso wrote:reading the commands in rawformat, does that have to be incorporated pre-compile?
No.
read the tcl-command.doc file about binds, what you are looking for is bind raw....
Elen sila lúmenn' omentielvo
n
nso
Voice
Posts: 19
Joined: Fri Apr 25, 2003 4:45 pm

Post by nso »

yeah, i figuered out as much as my start will be
bind raw - 332 proc_topicset
and
bind raw - 331 proc_notopicset

but i still dunno how to fetch the info out of the rawcommand.
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

Code: Select all

putserv "TOPIC $channel"
that will give you the topic set for that channel, however it will not always ahow who set the topic, not sure but I think that's different from server to server
anyway... the raw numeric for who set the topic is 333
will return Papillon!bla@bla.bla.bla.bla 1051371211
the first element beeing the nick and uhost of the user who set the topic ofcourse ;)
the second element is the unixtime of when the topic was set
Elen sila lúmenn' omentielvo
n
nso
Voice
Posts: 19
Joined: Fri Apr 25, 2003 4:45 pm

Post by nso »

thanx, got it all to work now.

here is the current code
bind raw * 333 proc_topicset

proc proc_topicset { from keyword arg } {
set testing $arg
putquick "PRIVMSG mynick :$testing"
}
have included lindex'ing and stuff, just have the code on another computer
M
MC_8
Voice
Posts: 36
Joined: Sat Apr 26, 2003 5:04 pm
Location: Dallas, Texas
Contact:

Post by MC_8 »

...
Last edited by MC_8 on Sun Apr 27, 2003 6:24 am, edited 1 time in total.
Carl M. Gregory - MC_8
http://mc.purehype.net/whois/
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

MC_8 wrote:

Code: Select all

putserv "TOPIC :$channel"
no need for the : it works perfectly fine without, ofcourse it doesn't hurt to put it in
Elen sila lúmenn' omentielvo
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

yea, the : is only "needed" if the argument/message has more than one word. good practice to use it every time though
photon?
M
MC_8
Voice
Posts: 36
Joined: Sat Apr 26, 2003 5:04 pm
Location: Dallas, Texas
Contact:

Post by MC_8 »

...
Last edited by MC_8 on Sun Apr 27, 2003 6:21 am, edited 1 time in total.
Carl M. Gregory - MC_8
http://mc.purehype.net/whois/
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

no, it is not! I suggest you read the given document one more time. As spock said, it is only needed if the argument/message has more than one word. When checking the topic you can have only 1 argument, if not you will set the topic in the channel specified...

Code: Select all

putserv "TOPIC #channel"
#gives you the topic for that channel
putserv "TOPIC #channel :blablabla"
#sets the topic in that channel to "blablabla" (if you are op in that channel ofcourse)
Elen sila lúmenn' omentielvo
M
MC_8
Voice
Posts: 36
Joined: Sat Apr 26, 2003 5:04 pm
Location: Dallas, Texas
Contact:

Post by MC_8 »

Ah yea, I was thinking of setting the topic ... not viewing the topic. Blah, it's too damn early to be thinking.

: is needed to set the topic, not view it... *yawn*
Carl M. Gregory - MC_8
http://mc.purehype.net/whois/
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

hehe
Elen sila lúmenn' omentielvo
Locked