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.

[SOLVED] Flag user information on join #

Old posts that have not been replied to for several years.
User avatar
Stealthx
Halfop
Posts: 68
Joined: Fri Oct 01, 2004 3:37 am
Location: StealthBox

[SOLVED] Flag user information on join #

Post by Stealthx »

Hi guys, I have this enquiry about bot (eggdrop)... I've seen numbers of bot message a channel when their owner/flagged user join the channel they are in... Just like this,

[08:31PM] * Joins: Owner (own@egghelp.org)
[08:31PM] <bot> [Owner] Owner of the bot [+n]

I've found this tcl FlagOnJoin31 in Egghelp Tcl Archive but I dunno whether does this TCL works which what I wanted.

My friend told me that .info could works for this, and I've setted with a info in DCC chat.

::20:24:09:: <bot> .info Owner Of The Bot
::20:24:09:: <bot> Your default info is now: Owner Of The Bot

But however when I joined a channel, nothing happen.
Last edited by Stealthx on Sat Dec 04, 2004 9:39 am, edited 1 time in total.
+ Stealth Box +
User avatar
]Kami[
Owner
Posts: 590
Joined: Thu Jul 24, 2003 2:59 pm
Location: Slovenia
Contact:

Post by ]Kami[ »

Don't be afraid, it don't bite it's just README!
# DCC COMMANDS:
#
# .onjoin add <#channel> <flag> <msg>
# - to make a onjoin message for <flag> informations about flags given with
# .onjoin flags
# - if <#channel> is * or -, then this will work on all channels which the bot
# is on.
# - You can add in the <msg>:
# %b - which will be replaced with: My nick, the botnick.
# %n - Will be replaced with: The nick of the person which we msg.
# %c - Will be replaced with: The channel which the person joined.
# %t - Will be replaced with: Current time and date.
#
# .onjoin rem <number of msg>
# - Remove a message. U can find the <number of msg> with
# .onjoin messages which lists the messages.
#
# .onjoin messages
# - gives you list of the added onjoin messages..
#
# .onjoin flags
# - shows list of flags which flagonjoin allows with description of every
# flag.
User avatar
Stealthx
Halfop
Posts: 68
Joined: Fri Oct 01, 2004 3:37 am
Location: StealthBox

Post by Stealthx »

But if I'm not wrong, this tcl is only base on FLAG user but not nick... If a particular flag have more den 1 user, both user who joined a channel will be having same message? :-?
+ Stealth Box +
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Eggdrop uses hostmasks to recognise a user, not a nick.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
Stealthx
Halfop
Posts: 68
Joined: Fri Oct 01, 2004 3:37 am
Location: StealthBox

Post by Stealthx »

Okie, so now if I used the FlagOnJoin31, if it's under a Flag, all onjoin message would be the same? What if a particular user have more den 1 flag?
+ Stealth Box +
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Code: Select all

  if {$command == "flags"} {
    putidx $idx "\n FlagOnJoin $flagver FLAGS:"
    putidx $idx ""
    putidx $idx " FLAG		DESCRIPTION"
    putidx $idx "-----------------------------------------------------------"
    putidx $idx " +n            Owner."
    putidx $idx " +m            Master."
    putidx $idx " +o            Op."
    putidx $idx " +t            Botnet master."
    putidx $idx " +f            Friend."
    putidx $idx " +j            Janitor."
    putidx $idx " +v            Voice."
    putidx $idx " +x            File system access."
    putidx $idx " +a            Auto-op."
    putidx $idx " -             For everyone."
    putidx $idx " *             For everyone."
    putidx $idx " nonusers      For people which ain't added in the bot."
    putidx $idx "-----------------------------------------------------------"
    putidx $idx " end of flags."
    return
  }
You could modify the code to use custom flags for users that have multiple flags like Bot Masters.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
Stealthx
Halfop
Posts: 68
Joined: Fri Oct 01, 2004 3:37 am
Location: StealthBox

Post by Stealthx »

Can this settled in DCC chat command? I remember there's a command called ".info", what is that for?
+ Stealth Box +
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Via the Command Console:
### info [channel] [info-line]
Sets your info line. This line is shown via the /msg commands 'who' and 'whois'. If you have set greet on, it is also shown when you join the channel. If the info line begins with an '@', then it is "locked", and you may no longer change it.
See also: chinfo
### chinfo <user> [channel] [info-line/none]
Sets the information line for a user. This line is shown via the /msg commands 'who' and 'whois'. If you have set greet on, it is also shown when the user joins the channel. If the info line begins with an '@', then it is "locked", and that user may no longer change it. If the channel name is omitted, the default info line is changed. If you specify 'none' as the info-line, it will be erased.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
Stealthx
Halfop
Posts: 68
Joined: Fri Oct 01, 2004 3:37 am
Location: StealthBox

Post by Stealthx »

Thanks alot :mrgreen: I forgotten to set the greet mode on on the channel. :D

By the way, the "user" which is needed in the command is the ".+user" that user?
+ Stealth Box +
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Is the user added to the bot aka handle :)
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
Kurupt
Voice
Posts: 26
Joined: Sun Aug 22, 2004 7:57 pm
Location: Hermanstat

....

Post by Kurupt »

Code: Select all

bind join - * pub:join
proc pub:join {nick uhost hand chan} {
if {[matchattr $hand Z|- $chan]} {putserv "privmsg $chan :owner entered"} else {
if {[matchattr $hand -|o $chan]} {putserv "privmsg $chan :op entered"} else {
if {[matchattr $hand -|- $chan]} {putserv "privmsg $chan :no flag user"} else {
if {[matchattr $hand -|- $chan] == 0} {putserv "privmsg $chan :no user from userlist"}
    }
   }
  }
 }
You got the ideea i think
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

I was kind of bored so here you go :x

Code: Select all

# The configuration
set flags(owner) "A Bot Owner Has Entered The Channel!"
set flags(master) "A Bot Master Has Entered The Channel!"
set flags(op) "A Bot Op Has Entered The Channel!"
set flags(halfop) "A Bot Halfop Has Entered The Channel!"
set flags(cowner) "A Channel Owner Has Entered The Channel!"
set flags(cmaster) "A Channel Master Has Entered The Channel!"
set flags(cop) "A Channel Op Has Entered The Channel!"
set flags(chalfop) "A Channel Halfop Has Entered The Channel!"

bind JOIN- * flags:join

proc flags:join { nickname hostname handle channel } {
global flags
if {[matchattr $handle n]} { putquick "PRIVMSG $channel :$flags(owner)"
} elseif {[matchattr $handle m]} { putquick "PRIVMSG $channel :$flags(master)"
} elseif {[matchattr $handle o]} { putquick "PRIVMSG $channel :$flags(op)"
} elseif {[matchattr $handle l]} { putquick "PRIVMSG $channel :$flags(halfop)"
} elseif {[matchattr $handle |n $channel]} { putquick "PRIVMSG $channel :$flags(cowner)"
} elseif {[matchattr $handle |m $channel]} { putquick "PRIVMSG $channel :$flags(cmaster)"
} elseif {[matchattr $handle |o $channel]} { putquick "PRIVMSG $channel :$flags(cop)"
} elseif {[matchattr $handle |l $channel]} { putquick "PRIVMSG $channel :$flags(chalfop)"
}
}
User avatar
Stealthx
Halfop
Posts: 68
Joined: Fri Oct 01, 2004 3:37 am
Location: StealthBox

Post by Stealthx »

Alchera wrote:Via the Command Console:
### info [channel] [info-line]
Sets your info line. This line is shown via the /msg commands 'who' and 'whois'. If you have set greet on, it is also shown when you join the channel. If the info line begins with an '@', then it is "locked", and you may no longer change it.
See also: chinfo
### chinfo <user> [channel] [info-line/none]
Sets the information line for a user. This line is shown via the /msg commands 'who' and 'whois'. If you have set greet on, it is also shown when the user joins the channel. If the info line begins with an '@', then it is "locked", and that user may no longer change it. If the channel name is omitted, the default info line is changed. If you specify 'none' as the info-line, it will be erased.
Greeting, I've set my .info as well as .chinfo and it have been successfully setted but however when I set a channel +greet on and I joined the channel, it doesn't greet me. Why is that so?
+ Stealth Box +
User avatar
Stealthx
Halfop
Posts: 68
Joined: Fri Oct 01, 2004 3:37 am
Location: StealthBox

Post by Stealthx »

MeTroiD wrote:I was kind of bored so here you go :x

Code: Select all

# The configuration
set flags(owner) "A Bot Owner Has Entered The Channel!"
set flags(master) "A Bot Master Has Entered The Channel!"
set flags(op) "A Bot Op Has Entered The Channel!"
set flags(halfop) "A Bot Halfop Has Entered The Channel!"
set flags(cowner) "A Channel Owner Has Entered The Channel!"
set flags(cmaster) "A Channel Master Has Entered The Channel!"
set flags(cop) "A Channel Op Has Entered The Channel!"
set flags(chalfop) "A Channel Halfop Has Entered The Channel!"

bind JOIN- * flags:join

proc flags:join { nickname hostname handle channel } {
global flags
if {[matchattr $handle n]} { putquick "PRIVMSG $channel :$flags(owner)"
} elseif {[matchattr $handle m]} { putquick "PRIVMSG $channel :$flags(master)"
} elseif {[matchattr $handle o]} { putquick "PRIVMSG $channel :$flags(op)"
} elseif {[matchattr $handle l]} { putquick "PRIVMSG $channel :$flags(halfop)"
} elseif {[matchattr $handle |n $channel]} { putquick "PRIVMSG $channel :$flags(cowner)"
} elseif {[matchattr $handle |m $channel]} { putquick "PRIVMSG $channel :$flags(cmaster)"
} elseif {[matchattr $handle |o $channel]} { putquick "PRIVMSG $channel :$flags(cop)"
} elseif {[matchattr $handle |l $channel]} { putquick "PRIVMSG $channel :$flags(chalfop)"
}
}
Firstly thanks for your code! But I've tried it, it doesn't seems to work for the first time due to some error so I've changed this "bind JOIN-" to "bind JOIN" but still it doesn't work. I've added a new user and chatter +n to the user but when the user joined, nothing happens.
+ Stealth Box +
User avatar
arcane
Master
Posts: 280
Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:

Post by arcane »

Stealthx wrote: Firstly thanks for your code! But I've tried it, it doesn't seems to work for the first time due to some error so I've changed this "bind JOIN-" to "bind JOIN" but still it doesn't work. I've added a new user and chatter +n to the user but when the user joined, nothing happens.
hehe... you should have changed "JOIN-" to "JOIN -" :)
aVote page back online!
Check out the most popular voting script for eggdrop bots.

Join the metal tavern!
Locked