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.

Invite help

Help for those learning Tcl or writing their own scripts.
Post Reply
User avatar
ComputerTech
Master
Posts: 399
Joined: Sat Feb 22, 2020 10:29 am
Contact:

Invite help

Post by ComputerTech »

Is it possible to make the bot check if a user has ~ (owner) or not without being on the channel?

Perhaps the bot could use /whois nick? it shows that way,

what i need is a user invites a bot to a channel with /msg bot join #channel, and the user inviting Must have ~ (owner) on that channel, otherwise the bot wont join.

Any Help apprecited :) :D
ComputerTech
Online
User avatar
CrazyCat
Revered One
Posts: 1216
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

The simplest way imho:
The user invites bot, bot join.
Then, it checks the user and if it doesn't match the flag you need, the bot parts.
But I'm not sure the ~ flag is easily parsable

So the second way: as you said, do a /whois and wait for the raw 319, then check if it matches {$nick : .*~$chan.*}
User avatar
ComputerTech
Master
Posts: 399
Joined: Sat Feb 22, 2020 10:29 am
Contact:

Post by ComputerTech »

I know about raw commands and such, but i am not fully sure how to do so :?

Can you maybe create a small bit of it? and i can add onto it?

Would be super Cool :D
ComputerTech
Online
User avatar
CrazyCat
Revered One
Posts: 1216
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

You have an example of functionnal script @ https://gitlab.com/tcl-scripts/chan-acc ... filter.tcl

It makes /who (adapt to use /whois) and wait for raw 352 (adapt for raw 319)
User avatar
ComputerTech
Master
Posts: 399
Joined: Sat Feb 22, 2020 10:29 am
Contact:

Post by ComputerTech »

Thanks CrazyCat :D
ComputerTech
User avatar
ComputerTech
Master
Posts: 399
Joined: Sat Feb 22, 2020 10:29 am
Contact:

Post by ComputerTech »

So yeah, i also found Thommeys tcl collection, http://thommey.tclhelp.net/?page=scripts


Arbitrary chanmodes (+q, +a), seems to have caught my eye, so it does isowner and such, seems perfect to my situation :D
ComputerTech
Post Reply