Home | Networks | Community | Need Help? 

 
 Quick search

 
 
 RegisterRegister   Log inLog in 

Radio TCL Script problem

 
Post new topic   Reply to topic    SearchIRC Forum Index -> IRC Scripts
Author Message
Lyhne1
Lurker
Lurker


Joined: 05 Jul 2008
Posts: 232
Location: In your Mom

PostPosted: Oct 04, 2009 2:22pm    Post subject: Radio TCL Script problem Reply with quote

Hello,

I have just setup a eggdrop and Radio tcl script I found. Some of the commands not working...maybe someone can give me insight of what might be wrong or missing.

Code:
############################################
############## radio-0.9.tcl ###############
############################################
#    http://radioscript.sourceforge.net/   #
# This is the main part of radio-0.9c.tcl! #
############################################

# Which is the radios main/public channel?
set radio:chan "#Sin-Clan-Radio"

# What's your radios name?
set radio:name "Sin-Clan"

# Whats your radios homepage?
set radio:url "http://www.shoutcast.com/directory/search_results.jsp?searchCrit=simple&s=Sin-Clan"

# URI of your Stream? (without listen.pls)
set radio:stream "http://24.113.65.9:2998/"
set radio:stream "http://94.23.208.176:9020/"

# Display a welcome message?
set radio:welcome "Welcome to Sin Clan Radio"

# Don't change the next 2 lines if you don't know what you're doing!
set radio:dj ""
set radio:nextdj ""

# Which flag is needed to change the active dj?
# (Only works if radio:commandmode is 1!)
set radio:flag "R|R"

# Should the DJ set himself as DJ ("1") or set somebody else
# into the DJ position ("2")?
set radio:dj:mode "1"

# Disable the radioscript by default.
set radio:on "2"

# Command mode:
# 1: MSG to bot, 2: Control over internal/command channel
set radio:commandmode "2"

# command channel (note _everybody_ can change anything if he/she gets
# into there!)
set radio:commandchan "#Sin-Clan-Radio!"

# In which file should the topic be saved?
set radio:topicfile "radio.topic"

# In which file should the internal/command chan topic be saved?
set radio:inttopicfile "radio.inttopic"

# Should I change the topic when changing the DJ?
set radio:set:topic "1"

# Should I change the command chan topic when the next dj is set?
# Note: Only use this if ${radio:commandchan} is set correctly!
set radio:set:inttopic "1"

# Use the botnet? (Small option, big change. ;))
set radio:net:enable "1"

#######################
# Script begins here! #
#######################
bind pub -|- !url radio:pub:url
bind pub -|- !stream radio:pub:stream
bind pub -|- !dj radio:pub:dj
bind pub -|- !wish radio:pub:wunsch
bind pub -|- !greet radio:pub:gruss
bind pub -|- !info radio:pub:info
bind pub -|- !nextdj radio:pub:nextdj
bind msg ${radio:flag} dj radio:msg:dj
bind msg ${radio:flag} radioon radio:msg:on
bind msg ${radio:flag} nextdj radio:msg:nextdj
bind msg ${radio:flag} next radio:msg:next
bind msg ${radio:flag} topic radio:msg:topic
bind join -|- * radio:join:welcome
bind pub -|- .dj radio:pub:setdj
bind pub -|- .radioon radio:pub:on
bind pub -|- .info radio:pub:dotinfo
bind pub -|- .nextdj radio:pub:setnextdj
bind pub -|- .next radio:pub:next
bind pub -|- .restart radio:pub:restart
bind pub -|- .topic radio:pub:topic
bind pub -|- .inttopic radio:pub:inttopic
bind pub -|- ?topic radio:pub:topicinfo
bind pub -|- .dotopic radio:pub:dotopic
bind pub -|- .ntopic radio:net:topic
bind bot - radio_wunsch radio:net:wunsch
bind bot - radio_gruss radio:net:gruss
bind bot - radio_status radio:net:sendstatus
bind link - * radio:net:onerstatus

proc radio:pub:url {nick host hand chan arg} {
   global radio:name radio:url radio:chan
        if {$chan == ${radio:chan}} {
                puthelp "NOTICE $nick :You can see the homepage of ${radio:name} at ${radio:url} if you want."
   }
}

proc radio:pub:stream {nick host hand chan arg} {
   global radio:name radio:stream radio:on radio:chan
        if {$chan == ${radio:chan}} {
      if {${radio:on}} {
                        puthelp "NOTICE $nick :The radio script is not active a this moment, sorry."
         return 0
      }
                puthelp "NOTICE $nick :Listen to the stream of ${radio:name} at ${radio:stream}listen.pls now!"
   }
}

proc radio:pub:dj {nick host hand chan arg} {
   global radio:dj radio:on radio:chan
        if {$chan == ${radio:chan}} {
      if {${radio:on}} {
                        puthelp "NOTICE $nick :The radio script is not active at this moment, sorrry."
         return 0
       }
                puthelp "NOTICE $nick :Right now, \002${radio:dj}\002 is amusing you with his or her music!"
   }
}

proc radio:pub:wunsch {nick host hand chan arg} {
   global radio:name radio:dj radio:on radio:chan radio:wunsch
        set radio:wunsch "$arg"
        if {$chan == ${radio:chan}} {
      if {${radio:on}} {
                        puthelp "NOTICE $nick :The radio script is not active at this moment, sorry."
         return 0
      }
                if {${radio:wunsch} == ""} {
                        puthelp "NOTICE $nick :What about giving me a title?!"
         return 0
      }
                putquick "PRIVMSG ${radio:dj} :04Wish: ${radio:wunsch} by $nick."
                puthelp "NOTICE $nick :Your wish ${radio:wunsch} has been sent to ${radio:dj}. Do not try wishing that again since we will obviously ignore you then!"
   }
}

proc radio:pub:gruss {nick host hand chan arg} {
   global radio:name radio:dj radio:on radio:chan radio:gruss
        set radio:gruss "$arg"
        if {$chan == ${radio:chan}} {
      if {${radio:on}} {
                        puthelp "NOTICE $nick :The radio script is not active at this moment, sorry."
         return 0
      }
                if {${radio:gruss} == ""} {
                        puthelp "NOTICE $nick :You did not append a greeting message!"
         return 0
      }
                putquick "PRIVMSG ${radio:dj} :07Greeting: ${radio:gruss} by $nick."
                puthelp "NOTICE $nick :Your greeting ${radio:gruss} has been sent to ${radio:dj}. Do not send the same greeting again or we will definately ignore you then! :P"
   }
}

proc radio:msg:dj {nick host hand arg} {
        global radio:name radio:dj radio:on radio:chan
   global radio:dj:mode radio:commandmode
   global radio:topicfile radio:topic radio:set:topic
   global radio:net:enable
   if {${radio:commandmode} == "2"} { return 0 }
   if {${radio:dj:mode} == "1"} {
      set radio:dj "$nick"
      if {${radio:on}} {
                        putquick "PRIVMSG ${radio:dj} :The radio script had been online before and has been activated now."
                        puthelp "PRIVMSG ${radio:chan} :The radio is now ONLINE with your DJ ${radio:dj}."
      }
                putquick "PRIVMSG ${radio:dj} :You are now DJ of ${radio:name}!"
      set radio:on "0"
                if {${radio:set:topic} == "1"} {
         source ${radio:topicfile}
                        putserv "TOPIC ${radio:chan} :${radio:topic}"
                }
      if {${radio:net:enable} == "1"} {
         putallbots "radio_dj ${radio:dj}"
      }
        } else {
                if {$arg == ""} {
                        putquick "NOTICE $nick :Gimme the nick of the DJ ..."
         return 0
      }
                set radio:dj "$arg"
      if {${radio:on}} {
                        putquick "PRIVMSG ${radio:dj} :The radio script had been online before and has been activated now."
                        puthelp "PRIVMSG ${radio:chan} :The radio is now ONLINE with your DJ ${radio:dj}."
      }
                putquick "PRIVMSG ${radio:dj} :You are now DJ of ${radio:name}."
                putquick "NOTICE $nick :${radio:dj} has been set as the current DJ of ${radio:name}."
      set radio:on "0"
                if {${radio:set:topic} == "1"} {
         source ${radio:topicfile}
                        putserv "TOPIC ${radio:chan} :${radio:topic}"
                }
      if {${radio:net:enable} == "1"} {
         putallbots "radio_dj ${radio:dj}"
      }
   }
}

proc radio:msg:on {nick host hand arg} {
        global radio:name radio:on radio:chan radio:dj radio:stream radio:url
   global radio:commandmode
   global radio:topicfile radio:topic radio:set:topic radio:stream
   global radio:net:enable
   if {${radio:commandmode} == "2"} { return 0 }
   set radio:on "1"
        set radio:dj "online"
   set radio:nextdj "none"
        putquick "NOTICE $nick :The radio script for ${radio:chan} has been deactivated."
        if {${radio:set:topic} == "1"} {
      source ${radio:topicfile}
                putserv "TOPIC ${radio:chan} :${radio:topic}"
        }
   if {${radio:net:enable} == "1"} {
      putallbots "radio_status on"
   }
}

proc radio:join:welcome {nick uhost hand chan} {
   global radio:name radio:chan botnick radio:welcome
   if {$nick == $botnick} {return 0}
   if {${radio:welcome} == "0"} {return 0}
        if {$chan == ${radio:chan}} {
                puthelp "NOTICE $nick :Welcome to ${radio:chan}, the IRC chan of ${radio:name}! You may use the following commands:"
                puthelp "NOTICE $nick :Type !url to get the address of our homepage, !stream on information where to listen to the radio, !dj to see the current and !nextdj for the next DJ. Further on you can !wish a song and !greet someone using the radio."
        }
}

proc radio:pub:setdj {nick host hand chan arg} {
        global radio:name radio:dj radio:nextdj radio:on radio:chan radio:url radio:stream
   global radio:dj:mode radio:commandmode radio:commandchan
   global radio:topicfile radio:topic radio:set:topic
   global radio:set:inttopic radio:inttopic radio:inttopicfile
   global radio:net:enable
   if {${radio:commandmode} == "1"} { return 0 }
        if {$chan == ${radio:commandchan}} {
      if {${radio:dj:mode} == "1"} {
         set radio:dj "$nick"
         if {${radio:on}} {
                           putquick "PRIVMSG ${radio:dj} :The radio script had been online before and has been activated now."
                           puthelp "PRIVMSG ${radio:chan} :The radio is now ONLINE with your DJ ${radio:dj}."
         }
                   putquick "PRIVMSG ${radio:dj} :You are now DJ of ${radio:name}."
         set radio:on "0"
                        if {${radio:set:topic} == "1"} {
            source ${radio:topicfile}
                                putserv "TOPIC ${radio:chan} :${radio:topic}"
                        }
         if {${radio:net:enable} == "1"} {
            putallbots "radio_dj ${radio:dj}"
         }
           } else {
                   if {$arg == ""} {
                           putquick "PRIVMSG $chan :Gimme the nick of the DJ, $nick ..."
            return 0
         }
                   set radio:dj "$arg"
         if {${radio:on}} {
                           putquick "PRIVMSG ${radio:dj} :The radio script had been online before and has been activated now."
                           puthelp "PRIVMSG ${radio:chan} :The radio is now online with your DJ ${radio:dj}."
         }
                   putquick "PRIVMSG ${radio:dj} :You are now DJ of ${radio:name}."
                   putquick "PRIVMSG ${radio:commandchan} :${radio:dj} has been set as the current DJ of ${radio:name}."
         set radio:on "0"
                        if {${radio:set:topic} == "1"} {
            source ${radio:topicfile}
                                putserv "TOPIC ${radio:chan} :${radio:topic}"
                        }
         if {${radio:set:inttopic} == "1"} {
            source ${radio:inttopicfile}
            putserv "TOPIC ${radio:commandchan} :${radio:inttopic}"
         }
         if {${radio:net:enable} == "1"} {
            putallbots "radio_dj ${radio:dj}"
         }
      }
   }
}

proc radio:pub:on {nick host hand chan arg} {
        global radio:name radio:on radio:chan radio:stream radio:url radio:dj radio:nextdj
   global radio:commandchan radio:commandmode
   global radio:topic radio:topicfile radio:set:topic
   global radio:set:inttopic radio:inttopic radio:inttopicfile
   global radio:net:enable
   if {${radio:commandmode} == "1"} { return 0 }
        if {$chan == ${radio:commandchan}} {
      set radio:on "1"
                set radio:dj "online"
      set radio:nextdj "none"
                putquick "PRIVMSG ${radio:commandchan} :The radio script for ${radio:chan} has been deactivated."
                if {${radio:set:topic} == "1"} {
         source ${radio:topicfile}
                        putserv "TOPIC ${radio:chan} :${radio:topic}"
                }
      if {${radio:set:inttopic} == "1"} {
         source ${radio:inttopicfile}
         putserv "TOPIC ${radio:commandchan} :${radio:inttopic}"
      }
      if {${radio:net:enable} == "1"} {
         putallbots "radio_status on"
      }
   }
}

proc radio:pub:info {nick host hand chan arg} {
   global radio:name radio:url radio:chan
        if {$chan == ${radio:chan}} {
                puthelp "NOTICE $nick :You may use the following commands:"
                puthelp "NOTICE $nick :Type !url to get the address of our homepage, !stream on information where to listen to the radio, !dj to see the current and !nextdj for the next DJ. Further on you can !wish a song and !greet someone using the radio."
   }
}

proc radio:pub:restart {nick host hand chan arg} {
   global radio:commandmode radio:commandchan
   if {${radio:commandmode} == "1"} { return 0 }
   if {$chan == ${radio:commandchan}} {
      restart
   }
}

proc radio:pub:dotinfo {nick host hand chan arg} {
   global radio:chan
   global radio:dj:mode radio:commandmode radio:commandchan
   global radio:set:topic
   if {${radio:commandmode} == "1"} { return 0 }
        if {$chan == ${radio:commandchan}} {
                puthelp "NOTICE $nick :You may use the following commands::"
      if {${radio:dj:mode} == "1"} {
         set radio:info:dj "Use \002.dj\002 to set \037yourself\037 as the DJ,"
         set radio:info:nextdj "use \002.nextdj\002 to be the next DJ as soon as someone uses \002.next\002,"
      } else {
         set radio:info:dj "Use \002.dj NICK\002 to set \037NICK\037 as the DJ,"
         set radio:info:nextdj "use \002.nextdj NICK\002 to set \037NICK\037 as the next DJ as soon as someone uses \002.next\002,"
      }
      set radio:info:restart "\002.restart\002 restarts the bot"
      set radio:info:on "und \002.radioon\002 deactivates the radio script."
      if {${radio:set:topic} == "1"} {
         set radio:info:topic "Informationen on the commands \002.topic\002 and \002.inttopic\002 will be given if you use \002?topic\002."
      } else {
         set radio:info:topic ""
      }
      puthelp "NOTICE $nick :${radio:info:dj} ${radio:info:nextdj} ${radio:info:restart} ${radio:info:on} ${radio:info:topic}"
   }
}

proc radio:pub:topicinfo {nick host hand chan arg} {
   global radio:chan
   global radio:commandmode radio:commandchan radio:dj:mode
   if {${radio:commandmode} == "1"} { return 0 }
        if {$chan == ${radio:commandchan}} {
                puthelp "NOTICE $nick :Use \002.topic\002 to set the topic which should be set as when changing the DJ or deactivating the script (DJ \"online\"). Note that some letters like \],\[,\",\},\{,\\ _have to_ be escaped with \\!"
      puthelp "NOTICE $nick :Example: \".topic \\\[ \${radio:name} \\\] \\\[ @ \${radio:dj} \\\] \\\[ Stream: \${radio:stream}listen.pls \\\]"
      puthelp "NOTICE $nick :Same applies for the internal topic. (\002.inttopic\002)"
   }
}

proc radio:pub:nextdj {nick host hand chan arg} {
   global radio:name radio:chan radio:nextdj radio:dj radio:on
        if {$chan == ${radio:chan}} {
      if {${radio:on}} {
                        puthelp "NOTICE $nick :The radio script is not active atm."
         return 0
       }
                if {${radio:nextdj} == ""} {
                        puthelp "NOTICE $nick :There is no successor for ${radio:dj}."
                        return 0
                }
                putquick "NOTICE $nick :${radio:nextdj} will do ${radio:dj}'s job later."
   }
}

proc radio:pub:setnextdj {nick host hand chan arg} {
   global radio:name radio:nextdj radio:on radio:chan
   global radio:dj:mode radio:commandmode radio:commandchan
   global radio:inttopic radio:inttopicfile global:set:inttopic
   global radio:net:enable
   if {${radio:commandmode} == "1"} { return 0 }
        if {$chan == ${radio:commandchan}} {
      if {${radio:dj:mode} == "1"} {
         set radio:nextdj "$nick"
                   putquick "PRIVMSG ${radio:commandchan} :${radio:nextdj} has been set as the next DJ of ${radio:name}."
           } else {
                   if {$arg == ""} {
                           putquick "PRIVMSG ${radio:commandchan} :Gimme the nick of the next DJ, $nick..."
            return 0
         }
                   set radio:nextdj "$arg"
                   putquick "PRIVMSG ${radio:nextdj} :You have been set as the next DJ for ${radio:name}."
                   putquick "PRIVMSG ${radio:commandchan} :${radio:nextdj} has been set as the next DJ for ${radio:name}."
      }
      if {${radio:set:inttopic} == "1"} {
         source ${radio:inttopicfile}
         putserv "TOPIC ${radio:commandchan} :${radio:inttopic}"
      }
      if {${radio:net:enable} == "1"} {
         putallbots "radio_nextdj ${radio:nextdj}"
      }
   }
}

proc radio:msg:nextdj {nick host hand arg} {
   global radio:name radio:chan radio:nextdj
   global radio:dj:mode radio:commandmode
   global radio:net:enable
   if {${radio:commandmode} == "2"} { return 0 }
   if {${radio:dj:mode} == "1"} {
      set radio:nextdj "$nick"
      putquick "PRIVMSG $nick :${radio:nextdj} has been set as the next DJ for ${radio:name}."
        } else {
                if {$arg == ""} {
                        putquick "NOTICE $nick :Gimme the nick of the next DJ, $nick  ..."
         return 0
      }
                set radio:nextdj "$arg"
      putquick "PRIVMSG ${radio:nextdj} :You have been chosen to be the next DJ for ${radio:name} by $nick."
           putquick "NOTICE $nick :${radio:nextdj} has been set as the next DJ for ${radio:name}."
   }
   if {${radio:net:enable} == "1"} {
      putallbots "radio_nextdj ${radio:nextdj}"
   }
}

proc radio:pub:next {nick host hand chan arg} {
        global radio:name radio:dj radio:nextdj radio:on radio:chan radio:stream radio:url
   global radio:commandchan radio:commandmode
   global radio:topicfile radio:topic radio:set:topic
   global radio:set:inttopic radio:inttopic radio:inttopicfile
   global radio:net:enable
   if {${radio:commandmode} == "1"} { return 0 }
        if {$chan == ${radio:commandchan}} {
      if {${radio:nextdj} == ""} {
         putquick "PRIVMSG ${radio:commandchan} :No successor set."
         return 0
      } else {
         set radio:dj "${radio:nextdj}"
         set radio:nextdj "none"
         if {${radio:on}} {
                           putquick "PRIVMSG ${radio:dj} :The radio script had been online before and has been activated now."
                           puthelp "PRIVMSG ${radio:chan} :The radio is now ONLINE with your DJ ${radio:dj}."
         }
                   putquick "PRIVMSG ${radio:dj} :You are now DJ of ${radio:name}."
         set radio:on "0"
                        if {${radio:set:topic} == "1"} {
            source ${radio:topicfile}
                                putserv "TOPIC ${radio:chan} :${radio:topic}"
                        }
         if {${radio:set:inttopic} == "1"} {
            source ${radio:inttopicfile}
            putserv "TOPIC ${radio:commandchan} :${radio:inttopic}"
         }
         if {${radio:net:enable} == "1"} {
            putallbots "radio_next next"
         }
         set radio:nextdj ""
      }
   }
}

proc radio:msg:next {nick host hand arg} {
        global radio:name radio:dj radio:nextdj radio:on radio:chan
   global radio:commandmode
   global radio:topicfile radio:topic radio:set:topic
   global radio:set:inttopic radio:inttopic radio:inttopicfile
   global radio:net:enable
           if {${radio:commandmode} == "2"} { return 0 }
      if {${radio:nextdj == ""} {
         putquick "PRIVMSG $nick :No successor set."
         return 0
      } else {
         set radio:dj "${radio:nextdj}"
         set radio:nextdj "none"
         if {${radio:on}} {
                           putquick "PRIVMSG ${radio:dj} :The radio script had been online before and has been activated now."
                           puthelp "PRIVMSG ${radio:chan} :The radio is now online with your DJ ${radio:dj}."
         }
                   putquick "PRIVMSG ${radio:dj} :You are now DJ of ${radio:name}."
         set radio:on "0"
                        if {${radio:set:topic} == "1"} {
            source ${radio:topicfile}
                                putserv "TOPIC ${radio:chan} :${radio:topic}"
                        }
         if {${radio:set:inttopic} == "1"} {
            source ${radio:inttopicfile}
            putserv "TOPIC ${radio:commandchan} :${radio:inttopic}"
         }
         if {${radio:net:enable} == "1"} {
            putallbots "radio_next next"
         }
      }
   }
}

proc radio:pub:topic {nick host hand chan arg} {
        global radio:chan radio:dj radio:name radio:stream radio:url
   global radio:commandchan radio:commandmode
   global radio:topicfile radio:topic radio:set:topic
        if {${radio:commandmode} == "1"} { return 0 }
   if {[llength $arg] == 0} {
      puthelp "PRIVMSG ${radio:commandchan} :You did not set any topic, $nick!"
      return 0
   }
        if {$chan == ${radio:commandchan}} {
                file delete ${radio:topicfile}
                set radio:openfile [open ${radio:topicfile} w]
      close ${radio:openfile}
                set radio:openfile [open ${radio:topicfile} a+]
      set radio:temptopic "set radio:topic \"$arg\""
                puts ${radio:openfile} ${radio:temptopic}
                close ${radio:openfile}
      source ${radio:topicfile}
                putquick "PRIVMSG ${radio:commandchan} The topic has been changed to: ${radio:topic}."
         }
}

proc radio:msg:topic {nick host hand arg} {
        global radio:chan radio:dj radio:name radio:stream radio:url
   global radio:commandmode
   global radio:topicfile radio:topic radio:set:topic
        if {${radio:commandmode} == "2"} { return 0 }
   if {[llength $arg] == 0} {
      puthelp "NOTICE $nick :You did not set any topic, $nick!"
      return 0
   }
   file delete ${radio:topicfile}
   set radio:openfile [open ${radio:topicfile} w]
   close ${radio:openfile}
   set radio:openfile [open ${radio:topicfile} a+]
   set radio:temptopic "set radio:topic \"$arg\""
   puts ${radio:openfile} ${radio:temptopic}
        close ${radio:openfile}
   source ${radio:topicfile}
        putquick "NOTICE $nick :The topic has been changed to: ${radio:topic}."
}

proc radio:pub:inttopic {nick host hand chan arg} {
   global radio:nextdj
        global radio:commandchan radio:commandmode
   global radio:inttopicfile radio:inttopic radio:set:inttopic
        if {${radio:commandmode} == "1"} { return 0 }
   if {${radio:set:inttopic} == "0"} { return 0 }
        if {[llength $arg] == 0} {
                puthelp "PRIVMSG ${radio:commandchan} :You did not set any topic, $nick!"
                return 0
        }
        if {$chan == ${radio:commandchan}} {
                file delete ${radio:inttopicfile}
                set radio:openfile [open ${radio:inttopicfile} w]
                close ${radio:openfile}
                set radio:openfile [open ${radio:inttopicfile} a+]
                set radio:temptopic "set radio:inttopic \"$arg\""
                puts ${radio:openfile} ${radio:temptopic}
                close ${radio:openfile}
                source ${radio:inttopicfile}
                putquick "PRIVMSG ${radio:commandchan} :The topic for the internal chan has been changed to: ${radio:inttopic}."
         }
}

proc radio:pub:dotopic {nick host hand chan arg} {
   global radio:chan
   global radio:commandchan radio:commandmode
   global radio:topicfile radio:topic radio:set:topic
   global radio:inttopicfile radio:inttopic radio:set:inttopic
   if {${radio:commandmode} == "1"} { return 0 }
   if {${radio:set:inttopic} == "0"} { return 0 }
   if {$chan == ${radio:commandchan}} {
      if {${radio:set:topic} == "1"} {
         source ${radio:topicfile}
         putserv "TOPIC ${radio:chan} :${radio:topic}"
         puthelp "PRIVMSG ${radio:commandchan} :Topic in \002${radio:chan}\002 set."
      }
      if {${radio:set:inttopic} == "1"} {
         source ${radio:inttopicfile}
         putserv "TOPIC ${radio:commandchan} :${radio:inttopic}"
         puthelp "PRIVMSG ${radio:commandchan} :Topic in \002${radio:commandchan}\002 set."
      }
   }
}

proc radio:net:wunsch {bot com arg} {
   global radio:dj radio:wunsch
   global radio:net:enable
   set radio:remotenick [lindex $arg 0]
   set radio:wunsch [join [lrange [split $arg " "] 1 end]]
   if {${radio:net:enable} == "1"} {
                putquick "PRIVMSG ${radio:dj} :07Wish: ${radio:wunsch} by ${radio:remotenick}."
   }
}

proc radio:net:gruss {bot com arg} {
   global radio:dj radio:gruss
   global radio:net:enable
   set radio:remotenick [lindex $arg 0]
   set radio:gruss [join [lrange [split $arg " "] 1 end]]
   if {${radio:net:enable} == "1"} {
                putquick "PRIVMSG ${radio:dj} :07Greet: ${radio:gruss} by ${radio:remotenick}."
   }
}

proc radio:net:sendstatus {bot com arg} {
   global radio:on radio:dj radio:nextdj
   global radio:net:enable
   if {${radio:net:enable} == "1"} {
      if {${radio:on}} {
         putbot $bot "radio_status on"
      } else {
         putbot $bot "radio_status on"
         putbot $bot "radio_dj ${radio:dj}"
         putbot $bot "radio_nextdj ${radio:nextdj}"
      }
   }
}

proc radio:net:onerstatus {botlinked via} {
   global radio:on radio:dj radio:nextdj
   global radio:net:enable
   if {${radio:net:enable} == "1"} {
      if {${radio:on}} {
         putbot $botlinked "radio_status on"
      } else {
         putbot $botlinked "radio_status on"
         putbot $botlinked "radio_dj ${radio:dj}"
         putbot $botlinked "radio_nextdj ${radio:nextdj}"
      }
   }
}

proc radio:net:topic {nick host hand chan arg} {
   global radio:chan radio:dj radio:name radio:stream radio:url
   global radio:commandchan radio:commandmode
   global radio:net:bot radio:net:topic
   if {${radio:commandmode} == "1"} { return 0 }
   if {[llength $arg] == 0} {
      puthelp "PRIVMSG ${radio:commandchan} :You did not set any topic, $nick!"
      return 0
   }
   if {$chan == ${radio:commandchan}} {
      set radio:net:bot [lindex $arg 0]
      set radio:net:topic [join [lrange [split $arg " "] 1 end]]
      putbot ${radio:net:bot} "radio_topic ${radio:net:topic}"
      putquick "PRIVMSG ${radio:commandchan} :The topic has been changed to: ${radio:net:topic}."
         }
}


# History:
# Version 0.9: Internationalization.
#
# Version 0.8: Botnet-Mode added
#
# Version 0.74: Wenn jemand den DJ setzt und der gleich dem nextDJ ist, wird der nextDJ gelöscht. Bugfixes & Adds für Topic für ${radio:nextdj} in ${radio:commandchan}, .dotopic added.
#
# Version 0.73: Topicwechsel z.B. für Anzeige von ${radio:nextdj} für Intern-Channel, Re-Colourierung, bei ".dj" jetzt "... seiner/ihrer Musik ..." *g*
#
# Version 0.72: Bei Topic setzen jetzt erst Überprüfung, ob auch was nach ".topic" steht ...
#
# Version 0.71: Andere Befehle zum Löschen und neu Erstellen der ${radio:topicfile}
#
# Version 0.7: Bei !nextdj jetzt auch keine Rckmeldung wenn Radioscript aus ist oder kein ${radio:nextdj} gesetzt wurde, .topic added und automatische Žnderung des Topics bei DJ-Wechsel (THX to CyBex & thommey @ #tcl @ QuakeNet!)
#
# Version 0.62: !gruß & !gruss (wober !gruß richtige Rechtschreibung ist und !gruss wenn das System die Umlaute nicht nimmt ...)
#
# Version 0.61: .restart added
#
# Version 0.6: Put-Modi geändert.
#
# Version 0.5: Welcome Message ab nun optional
#
# Version 0.4: !info und .info hinzugefügt, !nextdj, .nextdj und nextdj hinzugefügt, .next und next hinzugefügt
#
# Version 0.3: Notices reduziert, Befehlschannel hinzugefügt
#
# Version 0.2: Welcome Message hinzugefügt
#
# Version 0.1: 1. Release für #radio4life

set radio:version "0.9"
putlog "radio.tcl ${radio:version} (English) by hangy has been loaded."



This what I get from my bot.

[1:20pm] -DjBot- You may use the following commands:
[1:20pm] -DjBot- Type ^B!url^B to get the address of our homepage, ^B!stream^B on information where to listen to the radio, ^B!dj^B to see the current and ^B!nextdj^B for the next DJ. Further on you can ^B!wish^B a song and ^B!greet^B someone using the radio.
[1:20pm] <Lyhne1> !url
[1:20pm] -DjBot- You can see the homepage of Sin-Clan at http://www.shoutcast.com/directory/search_results.jsp?searchCrit=simple&s=Sin-Clan if you want.
[1:20pm] <Lyhne1> !stream
[1:20pm] -DjBot- The radio script is not active at this moment, sorry.
[1:20pm] <Lyhne1> !dj
[1:20pm] -DjBot- The radio script is not active at this moment, sorry.
[1:20pm] <Lyhne1> !wish
[1:20pm] -DjBot- The radio script is not active at this moment, sorry.
[1:20pm] <Lyhne1> !greet
[1:20pm] -DjBot- The radio script is not active at this moment, sorry.


Any/All help is welcome and Thank you!
Back to top
Trixar_za
Eleet
Eleet


Joined: 10 Dec 2006
Posts: 613
Location: South Africa

PostPosted: Oct 05, 2009 10:17am    Post subject: Reply with quote

Try using the command !radioon

Alternatively, you could just comment out (use a # before) set radio:on "2"
Back to top
Display posts from previous:   
Post new topic   Reply to topic    SearchIRC Forum Index -> IRC Scripts All times are GMT - 6 Hours
Page 1 of 1

 
 
Forum powered by phpBB
 
 © 2000 - 2008 EverythingIRC, Inc. All rights reserved. Please read our disclaimer