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.

Send notice to users with specific flag

Old posts that have not been replied to for several years.
Locked
B
BigSjedow
Voice
Posts: 21
Joined: Sun Nov 16, 2003 7:23 am

Send notice to users with specific flag

Post by BigSjedow »

Hey all,

is it possible to send a notice to all users with a specific flag ??
and if not, is it possible via a tcl ??

grz..

BS
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Yes surely it is possible via TCL, you can send a notice containing any text to any users with specific channel|global flags. However you would have to make the bot respond on a public trigger or a bind on a specific event for it to trigger on. :P
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
B
BigSjedow
Voice
Posts: 21
Joined: Sun Nov 16, 2003 7:23 am

Post by BigSjedow »

could u help me with this one ??
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

You didn't specify a problem, but heres the code for your logic.

If you have the variable $hand, then you can use this otherwise you need nick2hand to get it, and you need to have $nick for that as well, if it is from a raw or something.

Code: Select all

if {([matchattr $hand mnof|mnof $chan])} { putserv "NOTICE $nick :bla bla bla" }
where mnof|mnof are the flags global|channel to be matched for. You can modify those accordingly to your needs.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
B
BigSjedow
Voice
Posts: 21
Joined: Sun Nov 16, 2003 7:23 am

Post by BigSjedow »

well,

i dont have anything atm,

4 the line u gave me, i need to have to check all identified users. one by one
i asume i have to do this with the while or for loop but how do i get the list with al identified users ??
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

:-? dunno why you don't just open up eggdrop/doc/tcl-commands.doc in your own egg, or read all about user manipulation commands here....
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

BigSjedow wrote:well,

i dont have anything atm,

4 the line u gave me, i need to have to check all identified users. one by one
i asume i have to do this with the while or for loop but how do i get the list with al identified users ??
Well they don't have to be identified. If you use a special tcl script which requires passwords and authrization then you might have to make your notice script according to that as there maybe a custom flag invovled when the user has authorized (identified) himself with the bot.

Other than that I don't think it is a problem. You don't need to check all users in the bot's list, as mostly hostmasks are added in the .user file rather than nicks. What you can try is do a foreach loop of the channels followed by another foreach loop of the channel list of each channel and if a user's flag matches your custom/defined flag then notice that user, or alternatively you can check persons users flags on join/part and so on.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
B
BigSjedow
Voice
Posts: 21
Joined: Sun Nov 16, 2003 7:23 am

Post by BigSjedow »

YooHoo, sorry didn't thought of it, but helped alot. :)

and awyeah thx for givin' me a start :)

think i have what i needed..

Grz.

BS
Locked