source: tags/release-0-0-5/bMotion.tcl @ 1143

Revision 72, 3.7 KB checked in by anonymous, 9 years ago (diff)

This commit was manufactured by cvs2svn to create tag
'release-0-0-5'.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1#bMotion core
2#
3# $Id$
4#
5
6#
7# #5270 +(28)- [X]
8#
9# <Procyan> is there like 1 person on earth that knows tcl/tk and is writing all of the apps?
10# <unSlider> procyan: no, there are a bunch of people who dont know tcl/tk but are writing apps for it anyway
11#                                               (www.bash.org)
12
13set bMotionRoot "scripts/bmotion"
14set bMotionModules "$bMotionRoot/modules"
15set bMotionPlugins "$bMotionRoot/plugins"
16
17if {![info exists bMotion_testing]} {
18  putloglev d * "bMotion: bMotion_testing is not defined, setting to 0."
19  set bMotion_testing 0
20}
21
22source "$bMotionRoot/VERSION"
23if {$bMotion_testing == 0} {
24  putlog "bMotion $bMotionVersion starting up..."
25}
26
27if {$bMotion_testing == 1} {
28  putlog "bMotion: INFO: Code loading in testing mode"
29} else {
30  putloglev 1 * "bMotion: INFO: Code loading in running mode"
31}
32
33proc bMotion_putloglev { level star text } {
34  global bMotion_testing
35  if {![string match -nocase "bMotion: *" $text]} {
36    set text "bMotion: $text"
37  }
38
39  if {$bMotion_testing == 0} {
40    putloglev $level $star "($level)$text"
41  }
42}
43
44# init default variables
45if {$bMotion_testing == 1} {
46  putlog "... loading variables"
47}
48source "$bMotionModules/variables.tcl"
49
50# load abstracts file (formerly randoms)
51if {$bMotion_testing == 1} {
52  putlog "... loading abstracts"
53}
54source "$bMotionModules/abstracts.tcl"
55#try to load a file for this bot
56catch {
57  if {${botnet-nick} != ""} {
58    source "$bMotionModules/abstracts_${botnet-nick}.tcl"
59    bMotion_putloglev d * "loaded abstracts for this bot from abstracts_${botnet-nick}.tcl"
60  }
61}
62
63# load settings
64if {$bMotion_testing == 1} {
65  putlog "... loading settings"
66}
67source "$bMotionModules/settings.tcl"
68#try to load a file for this bot
69catch {
70  if {${botnet-nick} != ""} {
71    source "$bMotionModules/settings_${botnet-nick}.tcl"
72    bMotion_putloglev d * "loaded settings for this bot from settings_${botnet-nick}.tcl"
73  }
74}
75
76#load system functions
77if {$bMotion_testing == 1} {
78  putlog "... loading system"
79}
80source "$bMotionModules/system.tcl"
81
82# load output functions
83if {$bMotion_testing == 1} {
84  putlog "... loading output"
85}
86source "$bMotionModules/output.tcl"
87
88# load mood functions
89if {$bMotion_testing == 1} {
90  putlog "... loading mood"
91}
92source "$bMotionModules/mood.tcl"
93
94# load event functions
95if {$bMotion_testing == 1} {
96  putlog "... loading events"
97}
98source "$bMotionModules/events.tcl"
99
100if {$bMotion_testing == 1} {
101  putlog "... loading events support"
102}
103source "$bMotionModules/events_support.tcl"
104
105# load interbot bits
106if {$bMotion_testing == 1} {
107  putlog "... loading interbot"
108}
109source "$bMotionModules/interbot.tcl"
110
111# load friendship code
112if {$bMotion_testing == 1} {
113  putlog "... loading friendship"
114}
115source "$bMotionModules/friendship.tcl"
116
117# load plugins
118if {$bMotion_testing == 1} {
119  putlog "... loading plugins"
120}
121source "$bMotionModules/plugins.tcl"
122
123if {$bMotion_testing == 1} {
124  putlog "... loading plugin settings"
125}
126source "$bMotionModules/plugins_settings.tcl"
127
128# load anti-flood code
129if {$bMotion_testing == 1} {
130  putlog "... loading flood"
131}
132source "$bMotionModules/flood.tcl"
133
134# load other bits
135if {$bMotion_testing == 1} {
136  putlog "... loading leet"
137}
138source "$bMotionModules/leet.tcl"
139
140# Ignition!
141bMotion_startTimers
142if {$bMotion_testing == 0} {
143  set bMotionCache(rehash) ""
144  putlog "\002bMotion $bMotionVersion AI online\002 :D"
145}
146
147# set this to 0 to stop showing the copyright
148# DO NOT DISTRIBUTE THIS FILE IF THE VARIABLE IS SET TO 0
149set bMotion_show_copyright 1
150
151if {$bMotion_show_copyright == 1} {
152  putlog "bMotion is Copyright (C) 2002 James Seward. bMotion comes with ABSOLUTELY NO WARRANTY;"
153  putlog "This is free software, and you are welcome to redistribute it under certain conditions."
154  putlog "See the COPYRIGHT file for details. You can edit bMotion.tcl to hide this message once you have read it."
155}
Note: See TracBrowser for help on using the repository browser.