You cannot have two separate on CONNECT events. Combine the two scripts into one:
Code:
on *:CONNECT:{
  .timer 0 30 .ctcp $me ping
  .timer 0 30 msg #channel test
}