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.

Set Topic

Old posts that have not been replied to for several years.
Locked
S
SL|MK

Set Topic

Post by SL|MK »

Is there a script that any one knows of that would allow me to set a custom flag to a user so that they can use the bot to set the topic?

The bot is a op
the channel is +t

I have 2 people in our group that i want to give the ability to set the topic, but yet i do not want to make them op's.

Any help on this would be most apperciated.

I searched for topic tcl's and found nothing like this.
I also searched the fourms here and again found nothing.

Thanks for your time,

MK
m
mortician
Voice
Posts: 37
Joined: Sun Sep 22, 2002 6:35 pm
Location: Tsjakamaka
Contact:

Post by mortician »

well to give it to the users who have the +v flag on the channel you could do this simple script:

Code: Select all

bind pub - !topic pub:topic

proc pub:topic {nick uhost handle chan arg} {
if {[matchattr $handle &v $chan]} {
	if {[botisop $chan]} {
	putserv "TOPIC $chan :$arg"
	} else {
	putserv "NOTICE $nick :I can't change the topic because I'm not opped on $chan"
	}
} else { return }
}
well basic :-)

greetings
S
SL|MK

Post by SL|MK »

At the risk of sounding like the idiot i am :D

what do i do with that bro.?

and when i get it where it needs to go all they would have to do is type:
!topic xxxxxxxxxxxxxxxx
and the bot would set it?

sorry for my ignorance.

MK
P
Photon
Op
Posts: 170
Joined: Wed Aug 28, 2002 8:00 am
Location: Liverpool, England

Post by Photon »

This needs to be placed in a tcl script.

I suggest you start reading up on tcl scripting - this is best achieved by a: downloading the source and reading all the docs that come with that, and b: start downloading scripts from the tcl archive and studying them for pointers.

Once you've learnt tcl scripting, you'll be able to do anything you want!!

apart from that, yes, thats exactly what it would do, but it would let even non-users set the topic, which may be undesirable. You might wanna use bind pub ov|ov !topic, which would only allow ops or voices to trigger this command.
d
darko``
Op
Posts: 121
Joined: Sun Sep 08, 2002 5:33 pm
Location: Malta

Post by darko`` »

Mortitian, you'll need to pay a bit more attention to strings that can possibly contain [] chars and handle them with care...
Ignorant and lazy people will save 30 minutes by chosing simple config file. Smart ones will save 3000 minutes of *everyone's* time by opting for complete config file.
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Post by egghead »

darko`` wrote:Mortitian, you'll need to pay a bit more attention to strings that can possibly contain [] chars and handle them with care...
In the piece of code Mortician supplied, what care should be taken using $arg? It is a string of text, and used as such.
d
darko``
Op
Posts: 121
Joined: Sun Sep 08, 2002 5:33 pm
Location: Malta

Post by darko`` »

It was of course mistake on my part. I apologize. Tho if there was no hard evidence (luckily there are previous postings) i would sware i saw something fisshy, either lists, or misshandling of stirng.. But obviously, it is not the case here. Appologies once again.
Ignorant and lazy people will save 30 minutes by chosing simple config file. Smart ones will save 3000 minutes of *everyone's* time by opting for complete config file.
Locked