TCLDROP
Would you like to react to this message? Create an account in a few clicks or log in to continue.
TCLDROP

Eggdrop And TCL Help, Support And Chat
 
HomeHome  PublicationsPublications  FAQFAQ  SearchSearch  MemberlistMemberlist  Latest imagesLatest images  UsergroupsUsergroups  RegisterRegister  Log in  CalendarCalendar  WebsiteWebsite  ChatRoomChatRoom  

 

 TIP OF THE DAY!!

Go down 
2 posters
AuthorMessage
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

TIP OF THE DAY!! Empty
PostSubject: TIP OF THE DAY!!   TIP OF THE DAY!! Empty20/5/2020, 14:05

Hello All this is a topic of Tip Of The Day!
which means you can share eggdrop and tcl Tips

i will start of then everyone continue doest matter how silly or advanced the tip SHARE IT!!
Back to top Go down
http://www.computer-tech1.webnode.co.uk
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

TIP OF THE DAY!! Empty
PostSubject: Re: TIP OF THE DAY!!   TIP OF THE DAY!! Empty20/5/2020, 14:06

When using
Code:

[lindex $arg 0]
always make sure you use split to properly deal with your list.
Code:

[lindex [split $arg] 0]
Back to top Go down
http://www.computer-tech1.webnode.co.uk
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

TIP OF THE DAY!! Empty
PostSubject: Re: TIP OF THE DAY!!   TIP OF THE DAY!! Empty20/5/2020, 14:09

same goes with 
Code:
[lrange $arg 0 end]
use this instead
Code:
[join [lrange [split $arg] 0 end]]
Split is used to turn the string $arg into a list since lrange is applied to lists, and join converts it back to a string. (check out http://www.peterre.info/characters.html)
Back to top Go down
http://www.computer-tech1.webnode.co.uk
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

TIP OF THE DAY!! Empty
PostSubject: Re: TIP OF THE DAY!!   TIP OF THE DAY!! Empty20/5/2020, 14:12

To get the host from $uhost (ident@host) you can use the following
Code:
set host [lindex [split $uhost @] 1]
Now you can use *!*@$host as a banmask. 

Or you can use: 
Code:
scan $uhost %*\[^@\]@%s host

Which will also assign the host to $host.

To get both ident and host, you can use: 

Code:
scan ident@host %\[^@\]@%s ident host

Now you have the ident in $ident and the host in $host.
Back to top Go down
http://www.computer-tech1.webnode.co.uk
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

TIP OF THE DAY!! Empty
PostSubject: Re: TIP OF THE DAY!!   TIP OF THE DAY!! Empty20/5/2020, 14:17

Whilst saving an eggdrop.conf use all lower case. This will not effect the nickname of the bot but does save time looking in the dir to remember how you have saved the conf when it's crashed, and you have to restart.
Back to top Go down
http://www.computer-tech1.webnode.co.uk
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

TIP OF THE DAY!! Empty
PostSubject: Re: TIP OF THE DAY!!   TIP OF THE DAY!! Empty20/5/2020, 14:17

When you are looking for a bug in your new tcl that you are writing and is not necessarily an error use.... Putlog "got this far" .....in the tcl. and then move it so you can see what is happening.
Back to top Go down
http://www.computer-tech1.webnode.co.uk
ComputerTech
Owner
Owner
ComputerTech


Posts : 99
Points : 268
Reputation : 0
Join date : 2020-04-30

TIP OF THE DAY!! Empty
PostSubject: Re: TIP OF THE DAY!!   TIP OF THE DAY!! Empty12/6/2020, 14:09

Always Restart if you edit the bot config or edited a bind,
otherwise you can cause problems until you restart Shocked
Back to top Go down
http://www.computer-tech1.webnode.co.uk
EggMan
Voice
Voice



Posts : 6
Points : 10
Reputation : 0
Join date : 2020-06-30

TIP OF THE DAY!! Empty
PostSubject: Re: TIP OF THE DAY!!   TIP OF THE DAY!! Empty30/6/2020, 15:04

It's a good idea to setup a crontab for your eggdrop if it crashes and you want it to auto restart

./autobotchk eggdrop.conf -5

that would make the config "eggdrop.conf" try to restart every 5min
Back to top Go down
Sponsored content





TIP OF THE DAY!! Empty
PostSubject: Re: TIP OF THE DAY!!   TIP OF THE DAY!! Empty

Back to top Go down
 
TIP OF THE DAY!!
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
TCLDROP :: TCL :: Eggdrop & Tcl FAQ-
Jump to: