egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

autovoice script
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
sjones
Voice


Joined: 04 Nov 2005
Posts: 16

PostPosted: Fri Nov 04, 2005 4:09 pm    Post subject: autovoice script Reply with quote

Hi guys,
I'm looking for a script that will voice everyone who enters a channel, but also keeps track when someone is devoiced so that if this user parts and joins again they are not voiced by the bot.

Do you think this would be possible?

Thanks for your help!
Back to top
View user's profile Send private message
avilon
Halfop


Joined: 13 Jul 2004
Posts: 64
Location: Germany

PostPosted: Fri Nov 04, 2005 5:48 pm    Post subject: Reply with quote

Wrong forum! Script Requests

Code:
bind join - "#yourchannel *" av:join
bind part - "#yourchannel *" av:part

proc av:join {nick host hand chan} {
   global dontvoice
   if ![info exists dontvoice($chan)] { set dontvoice($chan) [list] }
   if {[botisop $chan]&&[lsearch -exact $dontvoice($chan) $host]=="-1"} {
      utimer 2 [list pushmode $chan +v $nick]
   }
}

proc av:part {nick host hand chan {msg ""}} {
   global dontvoice
   if ![info exists dontvoice($chan)] { set dontvoice($chan) [list] }
   if {![isbotnick $nick]&&![isvoice $nick $chan]&&![isop $nick $chan]&&[lsearch -exact $dontvoice($chan) $host]=="-1"} {
      lappend dontvoice($chan) $host
      timer 5 [list set dontvoice($chan) [lreplace $dontvoice($chan) [set foo [lsearch -exact $dontvoice($chan) $host]] $foo]]
   }
}

As always, not tested!


Last edited by avilon on Sat Nov 05, 2005 12:25 pm; edited 1 time in total
Back to top
View user's profile Send private message
NTHosts
Op


Joined: 10 Oct 2005
Posts: 100
Location: UK

PostPosted: Sat Nov 05, 2005 12:07 pm    Post subject: erm... Reply with quote

dood this is script requests Razz
_________________
www.NT-Hosts.Net - More than just a host
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
avilon
Halfop


Joined: 13 Jul 2004
Posts: 64
Location: Germany

PostPosted: Sat Nov 05, 2005 12:15 pm    Post subject: Reply with quote

Oh.. really?
This thread was moved by a mod Laughing
Back to top
View user's profile Send private message
sjones
Voice


Joined: 04 Nov 2005
Posts: 16

PostPosted: Sun Nov 06, 2005 10:10 am    Post subject: Reply with quote

Thanks alot for the speedy reply everyone, and sorry for creating the thread in the wrong forum doh!

I've loaded this script, and when I op the bot it sets +m channel mode, but does not op anyone who enters the channel. I've no idea about tcl so I can't try to figure out what could be wrong with the code Sad
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Nov 06, 2005 10:25 am    Post subject: Reply with quote

There's no +m on op in avilon's code. Are you using some other script?
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
sjones
Voice


Joined: 04 Nov 2005
Posts: 16

PostPosted: Sun Nov 06, 2005 10:44 am    Post subject: Reply with quote

Hehe no sorry, that's set in the bot's config for the channel, the channelmodes are +nmt so that's why it sets it to +m.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Nov 06, 2005 6:35 pm    Post subject: Reply with quote

Did you replace #yourchannel with the channel where you want the script to work?
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
sjones
Voice


Joined: 04 Nov 2005
Posts: 16

PostPosted: Thu Nov 10, 2005 3:21 pm    Post subject: Reply with quote

Yes I did Smile and it voices people who enter now. If I devoice them, and they part and rejoin they do not get voiced, which is excellent. However If I voice them, and they then part and rejoin, the bot does not voice them again. Could I perhaps get this feature too, if you don't mind?

Sorry for the trouble guys - we're nearly there though Smile
Back to top
View user's profile Send private message
avilon
Halfop


Joined: 13 Jul 2004
Posts: 64
Location: Germany

PostPosted: Thu Nov 10, 2005 4:49 pm    Post subject: Reply with quote

Code:
bind mode - "#yourchannel +v" av:mode

proc av:mode {nick host hand chan mode {target ""}} {
   global dontvoice
   if ![info exists dontvoice($chan)] return
   if {[set foo [lsearch -exact $dontvoice($chan) [getchanhost $target $chan]]]!="-1"} {
      set dontvoice($chan) [lreplace $dontvoice($chan) $foo $foo]
   }
}
Back to top
View user's profile Send private message
sjones
Voice


Joined: 04 Nov 2005
Posts: 16

PostPosted: Thu Nov 10, 2005 5:04 pm    Post subject: Reply with quote

Thanks very much avilon, that's perfect Smile
Back to top
View user's profile Send private message
sjones
Voice


Joined: 04 Nov 2005
Posts: 16

PostPosted: Sat Nov 12, 2005 6:42 pm    Post subject: Reply with quote

Hi guys, for some reason this script does not work on either ip addresses of if the ident has ~.

Does anyone know how to overcome this?
Back to top
View user's profile Send private message
sjones
Voice


Joined: 04 Nov 2005
Posts: 16

PostPosted: Sat Nov 12, 2005 7:07 pm    Post subject: Reply with quote

hi everyone, just tested it now, it's definately just if the host has a ~ in the ident, so if it's sjones@whatever it's fine, but if it's ~sjones@whatever it's not.

So, if they have a ~ in the ident, it will voice them after I devoic them and they part then join.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Nov 12, 2005 7:50 pm    Post subject: Reply with quote

I don't think this should cause a problem but anyway, add this line to the first 2 procs (part and join)
Code:
set host [string trimleft $host ~]

and this to the third (mode)
Code:
set thost [string trimleft [getchanhost $target $chan] ~]

and replace
Code:
if {[set foo [lsearch -exact $dontvoice($chan) [getchanhost $target $chan]]]!="-1"} {

with
Code:
if {[set foo [lsearch -exact $dontvoice($chan) $thost]]!="-1"} {

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
sjones
Voice


Joined: 04 Nov 2005
Posts: 16

PostPosted: Sat Nov 12, 2005 8:00 pm    Post subject: Reply with quote

That's perfect, thank you so much Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber