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 

timer and set topic

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
blake
Master


Joined: 23 Feb 2009
Posts: 201

PostPosted: Sun Feb 05, 2012 5:33 pm    Post subject: timer and set topic Reply with quote

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
View user's profile Send private message Visit poster's website
blake
Master


Joined: 23 Feb 2009
Posts: 201

PostPosted: Thu Feb 09, 2012 9:47 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Fri Feb 10, 2012 12:19 am    Post subject: Reply with quote

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
View user's profile Send private message
blake
Master


Joined: 23 Feb 2009
Posts: 201

PostPosted: Fri Feb 10, 2012 9:09 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Fri Feb 10, 2012 4:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
blake
Master


Joined: 23 Feb 2009
Posts: 201

PostPosted: Fri Feb 10, 2012 5:37 pm    Post subject: Reply with quote

Thanks speechless that worked it was recieving it in bold text
_________________
Blake
UKEasyHosting UKStormWatch
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
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