This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

How to do???

Old posts that have not been replied to for several years.
Locked
[
[MAX]Marco

How to do???

Post by [MAX]Marco »

Well i was discuss with some friends and we started a service for lend a bot.

sow I made a request TCL but since this is the first i made i still not know every command

but now i want to know how to let the "Request bot" the master of our service for checking the channel and then let himself and the requested bot join that channel. on the bots to request I put stormbot and that works fine but still got the how to put that "request bot" in the channel

if {$bot != ""} {
if {$chan1 != ""} {

putserv "NOTICE $nick : Je hebt aanvraag is ontvangen. De bot zal zo snel mogelijk komen."
+chan $chan1
putserv "PRIVMSG $chan :$bot join $chan1"
msg $chan1 Hi, I'm the requestbot of #MaxBots
msg $chan1 I will add $nick as the rightfull owner of $chan1
msg $chan1 $bot adduser $nick chanowner
msg $chan1 For more help on using your bot just typ : $bot help
msg $chan1 If you still have some questions come to #MaxBots and the opers will help you
return 0
}
}

this is a part of the script i made but how to puts that msg en +chan on that bot in his own partyline so that he joins that channel to?

someone can help me?

so what i mean is that normally me or a other admin typ in .+chan #channel but now the bot must do it on his own trought that TCL script
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Wellm use: 'channel add #channel'. Read the tcl-commands.doc file.
Once the game is over, the king and the pawn go back in the same box.
[
[MAX]Marco

Post by [MAX]Marco »

sow if i understand you you use in stead of : +chan $chan1 channel add $chan1

if i'm correct
[
[MAX]Marco

Post by [MAX]Marco »

owkey i saw it and that channel add #channel worked

but now how to put that msg in $chan1 ???

something like channel msg $chan1 ??
[
[MAX]Marco

Post by [MAX]Marco »

DAMNNZZZ am I so stupid ????

I used putserv "PRIVMSG $chan :text" :D

and then i'm asking how to put the text in new channel :S
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Replace all "msg $chan1 .." with "putserv "PRIVMSG $chan :text.." Also you may want to use something like:

Code: Select all

if {![llength $text] > 1} {
  put your warning, like: incorect usage of the command or something
}
This way if no bot and channel are specified will get that warning.
Once the game is over, the king and the pawn go back in the same box.
[
[MAX]Marco

Post by [MAX]Marco »

Now it works almost good its just this :
if {$bot != ""} {
if {$chan1 != ""} {

putserv "NOTICE $nick : Je hebt aanvraag is ontvangen. De bot zal zo snel mogelijk komen."
putserv "PRIVMSG $chan :$bot join $chan1"
channel add $chan1
putserv "PRIVMSG $chan1 :Hi, I'm the requestbot of #MaxBots"
putserv "PRIVMSG $chan1 :I will add $nick as the rightfull owner of $chan1"
putserv "PRIVMSG $chan1 :For more help on using your bot just typ : $bot help"
putserv "PRIVMSG $chan1 :If you still have some questions come to #MaxBots and the opers will help you"
putserv "PRIVMSG $chan1 :$bot adduser $nick chanowner"
channel remove $chan1

return 0
}
}
the $chan is the channel where the typ !request bot channel
and $chan1 is the channel that's gonna be joined
only now the problem is that my Requestbot joind that newchannel en directly part it but it must first say that 5 lines

some1 know how to fix it
[
[MAX]Marco

Post by [MAX]Marco »

caesar wrote:Replace all "msg $chan1 .." with "putserv "PRIVMSG $chan :text.." Also you may want to use something like:

Code: Select all

if {![llength $text] > 1} {
  put your warning, like: incorect usage of the command or something
}
This way if no bot and channel are specified will get that warning.
the warning works fine cause when i type !request name #channel it wil join but when I typ !request name channel he notice that person an error that he specified a wrong channel name
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Use a 'timer' or even a 'utimer'.

Eg.
timer 1 "channel remove $chan1"
or
utimer 10 "channel remove $chan1"
'timer' is in minutes and 'utimer' is in seconds. Read about them in the tcl-commands.doc file.
Once the game is over, the king and the pawn go back in the same box.
[
[MAX]Marco

Post by [MAX]Marco »

Yeah version 1 works fine know

look code below

Code: Select all

bind pub -|- ${tr}help help
bind pub -|- ${tr}request req
bind pub -|- ${tr}remove rem
bind pub -|- ${tr}site site
bind pub -|- ${tr}version versie


proc help {nick host hand chan arg} {
		global url tr geenpub
			set com [lindex [split $arg " "] 0]
			set arie [lindex [split $arg " "] 1]
		if {[lsearch -exact $geenpub [string tolower $chan]] >= 0} {
				
				return 0
}
			if {$com == ""} {
	putserv "NOTICE $nick : Je hebt de help trigger gebruikt. Hieronder alle beschrikbare triggers:"
	putserv "NOTICE $nick : ${tr}help - Deze help"
	putserv "NOTICE $nick : ${tr}help COMMAND - Uitgebreide help op een command"
	putserv "NOTICE $nick : ${tr}request - Vraag een bot aan"
	putserv "NOTICE $nick : ${tr}remove - Verwijder je bot"
	putserv "NOTICE $nick : ${tr}site - Onze website"
	putserv "NOTICE $nick : ${tr}version - My current running version of Request script"
return 0 
} else {
			if {$com == "remove"} {
	putserv "NOTICE $nick : Je hebt de help over command !remove gevraagt."
	putserv "NOTICE $nick : Met deze commando kunt u een bot van uw kanaal halen"
	putserv "NOTICE $nick : door !remove BOTNAAM #KANAAL te gebruiken bijvoorbeeld"
	putserv "NOTICE $nick : !remove ^UT2k3^ #maxbots Door dit zou de bot ^UT2k3^ kanaal #maxbots verlaten"
return 0
} else {
			if {$com == "request"} {
	putserv "NOTICE $nick : Je hebt de help over command !request aangevraagt."
	putserv "NOTICE $nick : Met dit commando kunt u een bot aanvragen voor uw kanaal"
	putserv "NOTICE $nick : door !request BOTNAAM #KANAAL tegebruiken bijvoorbeeld"
	putserv "NOTICE $nick : !request ^UT2k3^ #maxbots Door dit zou de bot ^UT2k3^ kanaal #maxbots binnengaan"
return 0
} else {
			if {$com == "site"} {
	putserv "NOTICE $nick : Je hebt de help over command !site aangevraagt."
	putserv "NOTICE $nick : Dit commando zal uw onze website en andere belangrijke sites"
	putserv "NOTICE $nick : van ons laten zien."
return 0
}
}
}
}
}

proc req {nick host hand chan arg} {
		global url cc geenpub
			set bot [lindex [split $arg " "] 0]
			set chan1 [lindex [split $arg " "] 1]
		if {[lsearch -exact $geenpub [string tolower $chan]] >= 0} {
				
				return 0
}
			if {$bot == ""} {
				putserv "NOTICE $nick : Je bent vergeten een botnaam op te geven"
				putserv "NOTICE $nick : Gebruik: ${cc}request BOTNAME #CHANNEL"
return 0
} else {
			if {$chan1 == ""} {
				putserv "NOTICE $nick : Je hebt geen channel opgegeven"
				putserv "NOTICE $nick : Gebruik: ${cc}request BOTNAME #CHANNEL"
return 0
} else { 
			if {[string first "#" $chan1] == -1} {
				putserv "NOTICE $nick : Je bent een # vergeten voor je kanaalnaam"
return 0
} else { 
			if {$bot != ""} {
				if {$chan1 != ""} {
 
				putserv "NOTICE $nick : Je hebt aanvraag is ontvangen. De bot zal komen zodra uw kanaal is gecontroleerd door mij."
				channel add $chan1
				putserv "PRIVMSG $chan :$bot join $chan1"
 				putserv "PRIVMSG $chan1 :Hi, I'm the requestbot of #MaxBots"
				putserv "PRIVMSG $chan1 :I will add $nick as the rightfull owner of $chan1"
				putserv "PRIVMSG $chan1 :For more help on using your bot just typ : $bot help"
				putserv "PRIVMSG $chan1 :If you still have some questions come to #MaxBots and the opers will help you"
				putserv "PRIVMSG $chan1 :$bot adduser $nick chanowner"
				utimer 20 "channel remove $chan1"

return 0 
							}
						}
	}
	}
	}
}

proc rem {nick host hand chan arg} {
		global url cc geenpub
			set bot [lindex [split $arg " "] 0]
			set chan1 [lindex [split $arg " "] 1]
		if {[lsearch -exact $geenpub [string tolower $chan]] >= 0} {
				
				return 0
}
			if {$bot == ""} {
				putserv "NOTICE $nick : Je bent vergeten een botnaam op te geven"
				putserv "NOTICE $nick : Gebruik: ${cc}remove BOTNAME #CHANNEL"
return 0
} else {
			if {$chan1 == ""} {
				putserv "NOTICE $nick : Je hebt geen channel opgegeven"
				putserv "NOTICE $nick : Gebruik: ${cc}remove BOTNAME #CHANNEL"
return 0
} else { 
			if {[string first "#" $chan1] == -1} {
				putserv "NOTICE $nick : Je bent een # vergeten voor je kanaalnaam"
return 0
} else { 
			if {$bot != ""} {
				if {$chan1 != ""} {
 
				putserv "NOTICE $nick : Je hebt zojuist je bot verwijderd van $chan1."
				putserv "PRIVMSG $chan :$bot part $chan1"
return 0 
							}
						}
	}
	}
	}
}

proc site {nick host hand chan arg} {
	global url cc geenpub
		if {[lsearch -exact $geenpub [string tolower $chan]] >= 0} {
				return 0
		} else {
			putserv "NOTICE $nick : Website : www.maxhosting.org"
			putserv "NOTICE $nick : Forum : http://forum.maxhosting.org" 
			putserv "NOTICE $nick : Gameservers : http://games.maxhosting.org (Nog niet beschrikbaar)"
			putserv "NOTICE $nick : Shell : http://shell.maxhosting.org (Nog niet beschrikbaar)"
			putserv "NOTICE $nick : Webhosting http://web.maxhosting.org (Nog niet beschrikbaar)"
			putserv "NOTICE $nick : Op de pagina's van shell, webhosting en gameservers kunt U zien welke servers we beheren"
			putserv "NOTICE $nick : welke domeinen we beheren en voor elk account zijn er files beschrikbaar zoals AdminMod,"
			putserv "NOTICE $nick : verschillende PHP scripts en de files om een eggdrop/bouncer op je shell te gebruiken"
return 0
		}
}

proc versie {nick host hand chan arg} {
	global geenpub versie
		if {[lsearch -exact $geenpub [string tolower $chan]] >= 0} {
				
				return 0
		} else {
			putserv "NOTICE $nick : My version is $versie"
			putserv "NOTICE $nick : The maker (Marco) is always making a beter version for me"
			putserv "NOTICE $nick : So wait a bit longer and I'm running a new version"
		}
}
But now i'm also working on the next version version 1.1
I want to use in the new version a check if that person is on the channel and also is opped. So i looked a bit in the tcl-document.doc and found that "onchan" and "isop" and think i should use those 2.

but i tried

Code: Select all

				channel add $chan1
						if {![onchan $nick $chan1]} {
							putserv "PRIVMSG $chan :Sorry $nick youre not on $chan1"
							return 1
						} else {
							if {[isop $nick $chan]} {
								putserv "PRIVMSG $chan :Yes $nick youre on $chan1 and youre opped there"
								return 0
							} else {
								putserv "PRIVMSG $chan :Sorry $nick but you dont have op on $chan1"
								return 0							
							} 
						}
				utimer 20 "channel remove $chan1"
and also this

Code: Select all

				channel add $chan1
						if {[onchan $nick $chan1]} {
							putserv "PRIVMSG $chan :Sorry $nick youre not on $chan1"
							return 1
						} else {
							if {[isop $nick $chan]} {
								putserv "PRIVMSG $chan :Yeah $nick is on $chan1 and he has op"
								return 0
							} else {
								putserv "PRIVMSG $chan :Sorry $nick but you haven't op on $chan1"
								return 0							
							} 
						}
				utimer 20 "channel remove $chan1"
But if i test it with my self I always get that i'm not on that channel ($chan1)
Locked