| View previous topic :: View next topic |
| Author |
Message |
blake Master
Joined: 23 Feb 2009 Posts: 201
|
Posted: Sun Feb 05, 2012 5:33 pm Post subject: timer and set topic |
|
|
Hey
Can someone help with this im looking to get a script that will send a command to a channel every 30 days command is !scores my eggdrop is then noticed of the top 3 ranked players for that month
Notice recieved
-GamesBot (GamesBot@staff.someserver.com)- This month: 1. nick1 (545) 2. nick2 (537) 3. nick3 (194)
id like to then get my bot to set the room topic with /topic #channelname Top three ranked players last month are 1. nick1 (545) 2. nick2 (537) 3. nick3 (194) well done (this bit is left out -GamesBot (GamesBot@staff.someserver.com)- )
bot will then message the channel with command !resetscores
many thanks _________________ Blake
UKEasyHosting UKStormWatch |
|
| Back to top |
|
 |
blake Master
Joined: 23 Feb 2009 Posts: 201
|
Posted: Thu Feb 09, 2012 9:47 pm Post subject: |
|
|
Okay I have this partially doing what I want it to do on notice it sets the channel topic but it uses the whole of the notice text
| Code: | bind notc - "*" user:notice
proc user:notice {nick uhost handle text dest} {
if {"GamesBot"=="$nick"} {
putserv "TOPIC #Countdown :Top 3 Players $text"
}
}
|
This is what it is setting in the topic
This month: 1. nick1 (545) 2. nick2 (537) 3. nick3 (194)
how do i go about getting it to ignore this part in the notice (This Month:) all i want it to show is 1. nick1 (545) 2. nick2 (537) 3. nick3 (194)
Also if my eggdrop joins my games channel it gets messaged by my gamesbot and sets the topic for any notice it recieves from it can it be set so that it only sets the topic if recieves a notice matching a specific set of text _________________ Blake
UKEasyHosting UKStormWatch |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Fri Feb 10, 2012 12:19 am Post subject: |
|
|
| Code: | bind notc - "*" user:notice
proc user:notice {nick uhost handle text dest} {
if {[string equal -nocase "gamesbot" $nick] && [string match -nocase "this month:*" $text]} {
putserv "TOPIC #Countdown :\002Top 3 Players\002: [string trim [join [lrange [split $text {:}] 1 end]]]"
}
}
|
_________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
blake Master
Joined: 23 Feb 2009 Posts: 201
|
Posted: Fri Feb 10, 2012 9:09 am Post subject: |
|
|
Thanks speechless I`ve tried this but it dont do any thing this is the full notice it recieves
-GamesBot (GamesBot@staff.cwukchat.com)- This month: 1. concrete_angel (2553) 2. hammer (1835) 3. crow_lestat (1829)
Only part I want set in the topic is 1. concrete_angel (2553) 2. hammer (1835) 3. crow_lestat (1829) _________________ Blake
UKEasyHosting UKStormWatch |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Fri Feb 10, 2012 4:35 pm Post subject: |
|
|
| blake wrote: | Thanks speechless I`ve tried this but it dont do any thing this is the full notice it recieves
-GamesBot (GamesBot@staff.cwukchat.com)- This month: 1. concrete_angel (2553) 2. hammer (1835) 3. crow_lestat (1829)
Only part I want set in the topic is 1. concrete_angel (2553) 2. hammer (1835) 3. crow_lestat (1829) |
The code I provided above does do this. You aren't being honest in your statement above...
| Quote: | | This month: 1. concrete_angel (2553) 2. hammer (1835) 3. crow_lestat (1829) |
Is that literally what the bot notices you? Because if it is, my code above would have worked. Is there any color, bold, etc in there one would need to be made aware of? If so, use the code below...
| Code: | bind notc - "*" user:notice
proc user:notice {nick uhost handle text dest} {
set text [stripcodes bcruag $text]
if {[string equal -nocase "gamesbot" $nick] && [string match -nocase "this month:*" $text]} {
putserv "TOPIC #Countdown :\002Top 3 Players\002: [string trim [join [lrange [split $text {:}] 1 end]]]"
}
} |
_________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
blake Master
Joined: 23 Feb 2009 Posts: 201
|
Posted: Fri Feb 10, 2012 5:37 pm Post subject: |
|
|
Thanks speechless that worked it was recieving it in bold text _________________ Blake
UKEasyHosting UKStormWatch |
|
| Back to top |
|
 |
|