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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
cache
Master
Posts: 306 Joined: Tue Jan 10, 2006 4:59 am
Location: Mass
Post
by cache » Sun Nov 12, 2006 11:56 am
Looking for a script that sends a message I have set to users who join room with mode +o
* Joins: User (User@User)
* User sets mode: +o User
Bot: Private Message: Hello User...
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sun Nov 12, 2006 12:23 pm
Code: Select all
bind mode - "* +o" hello:user
proc hello:user {nick uhost hand chan mc targ} {
if {[unixtime] - [getchanjoin $targ $chan] <= 3} {
puthelp "privmsg $targ :Hello $targ"
}
}
This will msg the user if he gets oped after 3 or less seconds from joining the channel.
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Sun Nov 12, 2006 12:23 pm
Code: Select all
bind MODE -|- * welcome:msg
proc welcome:msg {nickname hostname handle channel mode target} {
if {$mode == "+o"} {
if {[expr [clock seconds] - [getchanjoin $target $channel]] < 5} {
putmsg $channel "Hello $target.."
}
}
}
Heh, he beat me to it
cache
Master
Posts: 306 Joined: Tue Jan 10, 2006 4:59 am
Location: Mass
Post
by cache » Sun Nov 12, 2006 12:54 pm
Do these only work on +o flags? I tried to make one for a different flag it did nothing.
Like a z flag
* Joins: User (User@User)
* User sets mode: +z User
cache
Master
Posts: 306 Joined: Tue Jan 10, 2006 4:59 am
Location: Mass
Post
by cache » Sun Nov 12, 2006 1:23 pm
Only ops see +z btw, chatters don't... bot is oped and sees:
[12:16] #chan: mode change '+z user' by user!user@user
and I tried changing +o to +z
Code: Select all
bind mode - "* +z" hello:user
proc hello:user {nick uhost hand chan mc targ} {
if {[unixtime] - [getchanjoin $targ $chan] <= 5} {
puthelp "privmsg $targ :Hello $targ"
}
}
Seems it only works with +o
rosc2112
Revered One
Posts: 1454 Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania
Post
by rosc2112 » Sun Nov 12, 2006 1:25 pm
I use a nice little script called "flag on join" from the tcl archive. It can send different msgs to non-users, or different flagged users, etc. Very handy. My only complaint is it doesn't handle multiple flags within 1 message, but, eh small bother and I'm too lazy to fix it myself
Displays on-join messages to users with certain flags. Messages can be added, removed, etc. via DCC commands.
http://www.egghelp.org/cgi-bin/tcl_arch ... oad&id=126
cache
Master
Posts: 306 Joined: Tue Jan 10, 2006 4:59 am
Location: Mass
Post
by cache » Sun Nov 12, 2006 1:27 pm
Yes I tried that already wouldn't work on +z users nor do the options above.
rosc2112
Revered One
Posts: 1454 Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania
Post
by rosc2112 » Sun Nov 12, 2006 1:39 pm
set flags "mntofpjvxa\*" ;# Allowed flags..
Change that part of the flagonjoin script then it'll let you use +z or whatever other flags you want
I've done some other minor mods to this script, mostly formatting the output a little better, adding more help, and a couple of small bugfixes, I'll post it here:
http://members.dandy.net/~fbn/flagonjoin_rosc.tcl.txt
cache
Master
Posts: 306 Joined: Tue Jan 10, 2006 4:59 am
Location: Mass
Post
by cache » Sun Nov 12, 2006 1:44 pm
but msg can only be set by DCC? server has DCC blocked
rosc2112
Revered One
Posts: 1454 Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania
Post
by rosc2112 » Sun Nov 12, 2006 1:50 pm
I usually hand-edit the flagmsg file, but if that is not an option, just make a msg bind for the script:
Code: Select all
bind msg n onjoin msg:onjoin_addmsg
proc msg:onjoin_addmsg {nick uhost handle arg} {
copy the dcc:onjoin_addmsg proc's code and change all instances of
putidx $idx with puthelp "PRIVMSG $nick :etc"
}
and that should do the trick
cache
Master
Posts: 306 Joined: Tue Jan 10, 2006 4:59 am
Location: Mass
Post
by cache » Sun Nov 12, 2006 1:57 pm
ok you confused me lol, i'll have to sit down and puzzle all this together.
cache
Master
Posts: 306 Joined: Tue Jan 10, 2006 4:59 am
Location: Mass
Post
by cache » Sun Nov 12, 2006 2:17 pm
You say 'copy the dcc:onjoin_addmsg proc's code ' I copy and do what with it?
rosc2112
Revered One
Posts: 1454 Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania
Post
by rosc2112 » Sun Nov 12, 2006 3:24 pm
copy the dcc:onjoin_addmsg proc's code into the new msg:onjoin_addmsg proc
cache
Master
Posts: 306 Joined: Tue Jan 10, 2006 4:59 am
Location: Mass
Post
by cache » Sun Nov 12, 2006 6:45 pm
Ok I got script working but..
I did..
onjoin add #chan +z Test here
[5:39pm] <Bot> Stored the msg.
I join +z and nothing happened..
It works if I store a msg for +o, wonder why +z is so complicated.
rosc2112
Revered One
Posts: 1454 Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania
Post
by rosc2112 » Sun Nov 12, 2006 7:16 pm
I put another mod on the same url above to include the msg bind and the z flag, note the permissions for the msg bind are for +n users. The mod works for me. I tested it with the +z flag as well, using both a spefic channel name and just a * for all channels, this is what it looks like in the data file:
Either one of these worked just fine:
z #mychannel foobar biz
z * fooboobarbiz
Test user logged in/joined channel:
-TheEntity(~
TheEntity@TheEntity.funo.oper )- foobar biz
-TheEntity(~
TheEntity@TheEntity.funo.oper )- fooboobarbiz